text:
关于开设TCP动态端口的问题

Please skip to the English section below if you don't write Chinese.
中文：
提交 Issue 之前请先阅读 Issue 指引，然后回答下面的问题，谢谢。
除非特殊情况，请完整填写所有问题，缺少信息将减慢Issue回复速度。

你正在使用哪个版本的 V2Ray？（如果服务器和客户端使用了不同版本，请注明）
都是V2.51最新版，前天刚升了级。V2.5的时候也有我下面描述的问题。

你的使用场景是什么？比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
Chrome 浏览谷歌优土鳖等。v2ray设置的TCP443端口+TLS，动态端口每次在29800~30000范围里随机刷2个，每60分钟刷新一次，也是TCP+TLS。均能正常访问，只是有一些奇怪的日志问题。

你看到的不正常的现象是什么？（请描述具体现象，比如访问超时，TLS 证书错误等）
v2ray服务器端的error.log会每小时出现2条（完全符合我随机端口的设定）这样的警告记录——
……
2017/12/01 01:27:30 [Warning]Transport|Internet|TCP: failed to accepted raw connections > Retry: [accept tcp [::]:29982: use of closed network connection] > Retry: all retry attempts failed
2017/12/01 01:27:30 [Warning]Transport|Internet|TCP: failed to accepted raw connections > Retry: [accept tcp [::]:29881: use of closed network connection] > Retry: all retry attempts failed
2017/12/01 02:27:30 [Warning]Transport|Internet|TCP: failed to accepted raw connections > Retry: [accept tcp [::]:29979: use of closed network connection] > Retry: all retry attempts failed
2017/12/01 02:27:30 [Warning]Transport|Internet|TCP: failed to accepted raw connections > Retry: [accept tcp [::]:29973: use of closed network connection] > Retry: all retry attempts failed

你期待看到的正确表现是怎样的？
在shell界面执行下方命令看见这样的结果——
root@localhost:~# lsof -i6 |grep v2ray
v2ray   6330 root    6u  IPv6  61399      0t0  TCP *:https (LISTEN)
v2ray   6330 root    9u  IPv6  83111      0t0  TCP *:29973 (LISTEN)
v2ray   6330 root   11u  IPv6  84795      0t0  TCP *:29955 (LISTEN)
v2ray   6330 root   12u  IPv6  84796      0t0  TCP *:29884 (LISTEN)
v2ray   6330 root   13u  IPv6  83112      0t0  TCP *:29979 (LISTEN)
奇特的地方在于，我只开了2个随机端口，但是显示双倍的个数。
经过仔细对比，我发现error.log里出现的2个警告报错端口号，会和上面命令后看见其中2个号重合。

我再按时间顺序简单描述一下这个情况的产生——
（为方便描述，假设仍然是"concurrency": 2,  "refresh": 60 ，并且假设打开的随机端口是按顺序产生的）
①systemctl restart v2ray后用lsof -i6 |grep v2ray查看端口，发现开出了2个端口，假设为1001和1002；
②服务器端error.log出现[Warning]Core: V2Ray started的警告日志；
③1小时后观察error.log无反应，但是lsof -i6 |grep v2ray观察打开的端口，会变成4个！假设为1001、1002、1003和1004，本机telnet过去发现这4个端口均有响应；
④再次1小时后（也就是重启v2ray的2小时后）观察error.log，新出现2条上方提到提到的警告，端口为1001和1002；此时lsof观察打开的端口仍然是4个，为1003、1004、1005和1006；
⑤如果再等1小时，警告日志中报错的端口会是1003和1004，实际打开的端口会是1005、1006、1007和1008。

请附上你的配置（提交 Issue 前请隐藏服务器端IP地址）。
服务器端配置:

    // 在这里附上服务器端配置文件

客户端配置:

    // 在这里附上客户端配置

请附上出错时软件输出的错误日志。在 Linux 中，日志通常在 /var/log/v2ray/error.log 文件中。
服务器端错误日志:

    // 在这里附上服务器端日志

客户端错误日志:

    // 在这里附上客户端日志

客户端里会常有这样的日志
[Warning]failed to handler mux client connection > Proxy|VMess|Outbound: connection ends > context canceled
但看上去应该和本问题无关

请附上访问日志。在 Linux 中，日志通常在 /var/log/v2ray/error.log 文件中。

    // 在这里附上服务器端日志

请预览一下你填的内容再提交。
如果你已经填完上面的问卷，请把下面的英文部份删除，再提交 Issue。
Please remove the Chinese section above.
English:
Please read the instruction and answer the following questions before submitting your issue. Thank you.
Please answer all the questions with enough information. Lack of information will delay response.

What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)?

What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.

What did you see? (Please describe in detail, such as timeout, fake TLS certificate etc)

What's your expectation?

Please attach your configuration file (Mask IP addresses before submit this issue).
Server configuration:

    // Please attach your server configuration here.

Client configuration:

    // Please attach your client configuration here.

Please attach error logs, especially the bottom lines if the file is large. Error log file is usually at /var/log/v2ray/error.log on Linux.
Server error log:

    // Please attach your server error log here.

Client error log:

    // Please attach your client error log here.

Please attach access log. Access log is usually at '/var/log/v2ray/access.log' on Linux.

    // Please attach your server access log here.

Please review your issue before submitting.

这个错误信息是正常，每次动态端口切换的时候都会有这个信息。


text:
Constructing hashmap in vertexmap: avoid the memory copy to reduce peek memory requirements

Describe your problem
as titled, see also: https://github.com/alibaba/GraphScope/issues/2127
Additional context
Add any other context about the problem here.

See also: https://github.com/v6d-io/v6d/issues/974

See #1102, our profiling shows that the hashmap isn't a big concern with proper hash functions.
Closing.

source: gharchive/issue

license_type: permissive

license_source: github-api


text:
'To be reimbursed' label randomly shown

In desktop big screen, the 'To be reimbursed' label is sometimes hidden, sometimes shown but in the background of the title bar.

Cannot reproduce. Try shift-refreshing to make sure you have all the newest content. If you keep seeing this, please add a screen short to help me debug.

Does not happen anymore after some colour changes.

authors: manolo vaadin-marcus

repo: vaadin/expense-manager-demo

license_source: bigquery


text:
Refactor menu-overlay mixin

Utilize vaadin-overlay opening and closing animation feature (different animations for larger and small viewports)

Use CSS media queries instead of element-specific state attributes (phone and fullscreen) for triggering “bottom sheet” behavior

⚠ Note
Breaks vaadin-combo-box-overlay as it currently includes lumo-menu-overlay styles. Now the styles affect it as they are based on normal CSS media queries and not on the state/viewport attributes used by the other overlay elements (dropdown-menu and context-menu).
PR to fix combo box to be compatible with this change: https://github.com/vaadin/vaadin-combo-box/pull/626

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

mixins/menu-overlay.html, line 72 at r1 (raw file):

          overflow: auto;
          -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);

Why have you removed the Edge crash workaround below? That is likely to break again, you should be able to use nested @supports inside of the @media rule.

Comments from Reviewable

Review status: all files reviewed at latest revision, 1 unresolved discussion.

mixins/menu-overlay.html, line 72 at r1 (raw file):
Previously, web-padawan (Sergey Kulikov) wrote…
Why have you removed the Edge crash workaround below? That is likely to break again, you should be able to use nested @supports inside of the @media rule.

UPD: now when we're not using CSS custom properties that might not break Edge, but I would suggest keeping the workaround so we don't break it occasionally by re-introducing those.

Comments from Reviewable

Review status: all files reviewed at latest revision, 1 unresolved discussion.

mixins/menu-overlay.html, line 72 at r1 (raw file):
The reason was in the first commit message (sorry for not adding it in the PR message):

Don’t use a custom property for the mask-image (not supported on iOS9). This allows us to remove the Edge workaround as well.

Reason is iOS9, which seems doesn’t work if I use a custom property in a mask-image.
The same is used in date-picker: https://github.com/vaadin/vaadin-date-picker/blob/master/theme/lumo/vaadin-date-picker-overlay-content.html#L27-L28

Comments from Reviewable

Review status: all files reviewed at latest revision, 1 unresolved discussion.

mixins/menu-overlay.html, line 72 at r1 (raw file):
Previously, jouni (Jouni Koivuviita) wrote…
The reason was in the first commit message (sorry for not adding it in the PR message):

Don’t use a custom property for the mask-image (not supported on iOS9). This allows us to remove the Edge workaround as well.

Reason is iOS9, which seems doesn’t work if I use a custom property in a mask-image.
The same is used in date-picker: https://github.com/vaadin/vaadin-date-picker/blob/master/theme/lumo/vaadin-date-picker-overlay-content.html#L27-L28

OK then I'm fine with this, checked in Edge and it doesn't break anything.

Comments from Reviewable

Review status: all files reviewed at latest revision, 4 unresolved discussions, all commit checks successful.

a discussion (no related file):
BTW nitpick: the use of word fullscreen is confusing for me. Expected phone viewport to make overlays fullscreen, not the desktop.

mixins/menu-overlay.html, line 59 at r1 (raw file):

        [part="overlay"] {
          max-height: 50vh;
          width: 100vw;

Isn’t it stretched already with the flexbox on the host?

mixins/menu-overlay.html, line 66 at r1 (raw file):

        /* The content part scrolls instead of the overlay part, because of the gradient fade-out */
        [part="content"] {
          padding: 30px var(--lumo-space-m);

BTW fixed number padding value?

mixins/menu-overlay.html, line 70 at r1 (raw file):

          box-sizing: border-box;
          -webkit-overflow-scrolling: touch;
          overflow: auto;

BTW should we move the scrolling to the overlay part? It doesn't play nice with the vertical padding on the same element.

Comments from Reviewable

Review status: all files reviewed at latest revision, 4 unresolved discussions.

a discussion (no related file):
Previously, platosha (Anton Platonov) wrote…
BTW nitpick: the use of word fullscreen is confusing for me. Expected phone viewport to make overlays fullscreen, not the desktop.

I’ll update the code comment (if you are referring to that) to clarify what I mean.

mixins/menu-overlay.html, line 59 at r1 (raw file):
Previously, platosha (Anton Platonov) wrote…
Isn’t it stretched already with the flexbox on the host?

Yeah, it is. I suppose this should be fixed in vaadin-date-picker instead since I am actually fixing that here – vaadin-date-picker-overlay defines a fixed width for the overlay part: https://github.com/vaadin/vaadin-date-picker/pull/518/files#diff-9c37ae7ed7d9086fb50a70f161ab35c5L9

mixins/menu-overlay.html, line 66 at r1 (raw file):
Previously, platosha (Anton Platonov) wrote…
BTW fixed number padding value?

True, could use a sizing or spacing property instead. What do you think would make sense?

mixins/menu-overlay.html, line 70 at r1 (raw file):
Previously, platosha (Anton Platonov) wrote…
BTW should we move the scrolling to the overlay part? It doesn't play nice with the vertical padding on the same element.

The overlay part contains the background color, so it can’t have the mask-image. The content part can’t have the mask-image if the overlay part scrolls since it’s height will be unconstrained (and the mask-image would scroll with the overlay part. So it’s a bit of a “pickle in a jar” situation.
As these styles are mainly targeted for iOS and Android, I think it’s an acceptable tradeoff. Have to admit, that I don’t remember tested this on Android, only iOS.

Comments from Reviewable

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions.

Comments from Reviewable

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions.

Comments from Reviewable

source: gharchive/pull-request

authors: YuriyVaadin jouni platosha web-padawan

repo: vaadin/vaadin-lumo-styles


text:
allow multidelegation keys

No difference in UI treatment between keys with index 0 and more than 0, as discussed with IOG and others.

https://github.com/LedgerHQ/app-cardano/pull/53 should be processed before this.

repo: vacuumlabs/ledger-app-cardano-shelley


text:
Wrong tree structure

Hi, can anyone help me with this problem?
I'have a big number of items in my tree, but the folder don't respect the right tree structure.
This is my case:
https://jsfiddle.net/7vw0c2z9/
I'm using the alternative JSON structure.
Thanks a lot!

There are two problems that I can see:

You did not have a parent property on the root node, which caused jstree to NOT use the alternative format.
When the parent property is added there is an error - meaning you have a node whose parent does not exist, but I did not take the time to find which one.

Here is a trimmed down version of your fiddle:
https://jsfiddle.net/7vw0c2z9/1/

Hi @vakata , thanks for your fast reply.
I deliberately omitted the parent property to display at least the tree. Speaking about how the father-son relationship, I'm sure there is not a son without a father. But, to be sure, there is a way to make the plugin catch the error and tell me what is the children orphans?
Thanks again!

Currently no, but I guess you could iterate through the object quickly and check for missing parents, or duplicated IDs (that could be the cause of the issue as well).

authors: AndreaLombardo vakata

repo: vakata/jstree

license: mit


text:
Row double tap event

Is there a way to handle a node row double tap event on touch screens? The jquery doubletap event doesn't seem to work for this use case.

Sorry for getting so long to get back to you - unfortunately, I can not provide a solution for this. I have no idea which events jquery doubletap uses. jstree will intercept clicks, so I guess that is what is causing the problem, but I can not help further.

authors: david-fiaty vakata


text:
Show skipped tests in gray color

Instead of showing the skipped tests as failed (not passed),
display them separately (using dimmed gray, not green or red).

@afbjorklund Hi 👋 Thank you so much for taking the time to add this update. I really like what you did here. I'll aim for a release this weekend based on your changes. Once again, thank you for your contribution. Have a wonderful weekend! Cheers! 🍻

Thanks!

authors: afbjorklund vakenbolt

repo: vakenbolt/go-test-report


text:
Does not "see" jsx elements in headers, tables,...

As you see the <SpriteIlluminatorBevel> element is part of the heading (##) but it's not recognised by the plugin. The import statement is greyed out and removed by auto-format because it seems not be be in use.
It's the same with tables and other elements:

Thanks for the report!
# Hello, world! <Box />

Reproduced in:
Build #WS-212.5080.40, built on August 18, 2021
Licensed to JetBrains Team / Vladislav Sholokhov
You have a perpetual fallback license for this version.
Subscription is active until March 30, 2023.
Runtime version: 11.0.11+9-b1504.16 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-81-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1982M
Cores: 8
Non-Bundled Plugins: mdx.js (1.2.212)
Current Desktop: ubuntu:GNOME```

authors: CodeAndWeb vladsholokhov

repo: valentinnodan/mdx-intellij-plugin

license: MIT


text:
Login Functionality

[ ] login by bitbucket account
[ ] login by github account

#15

Login by github account #16

There should be a list of available options to login:
login by github,
login by bitbucket

On the main screen, there should be buttons that redirect to specific platform OAuth.

repo: valueadd-poland/pimp-my-pr


text:
Update to master

Let's not let changes pileup like last time + I would like to test the conda-bot.

Somehow still skips tests?

hell yea! Can't leave our 8 fans waiting :)

authors: Maarten-vd-Sande siebrenf

repo: vanheeringen-lab/snakemake-workflows


text:
gradle sizeDebugApk - Android Gradle Plugin 1.5.0

This fails with the following:
$ gradle sizeDebugApk
$ gradle assemble sizeDebugApk

Error Message:
:sizeDebugApk

FAILURE: Build failed with an exception.

* What went wrong:
Could not add entry ':sizeDebugApk' to cache taskArtifacts.bin (~/.gradle/2.8/taskArtifacts/taskArtifacts.bin).
> Unable to store task input properties. Property 'apk' with value 'com.android.build.gradle.internal.api.ApkVariantOutputImpl_Decorated@122800df' cannot be serialized.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.79 secs

As far as I know gradle sizeDebugApk fails if there is no APK file. gradle assemble sizeDebugApk should work though since it does build the apk.
Can you verify that?
If that's the case, I'd propose a custom message instead of crashing when there is no APK file.

Okay I was able to reproduce this one. Though I have the same problem when I'm using the dexcount. Can you execute count<Variant>DexMethods without getting any errors?

@jaredsburrows I'll release 0.1.1 later this day and also work on #3 in the next few days

@vanniktech Sounds good! I am looking forward to it.

@jaredsburrows I just published the new version to Maven Central and to Gradle Plugins

@jaredsburrows automated snapshots are now also working

@vanniktech Nice Job!
:app:root-checker:packageDebug
:app:root-checker:zipalignDebug
:app:root-checker:assembleDebug
Total methods in root-checker-debug.apk: 38083
Total fields in root-checker-debug.apk:  21817
Total APK Size in root-checker-debug.apk in bytes: 3231060 <--- Your plugin

BUILD SUCCESSFUL

Thanks. If you run into any issues, let me know. I also updated the README and added some more information.

authors: jaredsburrows vanniktech


text:
🛑 Carrefour is down

In 455bc43, Carrefour (https://zakaz.uz/carrefour) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Carrefour is back up in b20fa9d.

repo: vanyakosmos/zakaz-uptime


text:
Strip ansi codes out of calls to textLine

Kotter aims to be opinionated about its ansi output and (via the Virtual Console) the subset of ansi it supports, so don't let users add whatever they want into their strings

Hi. I just used kotter for the first time in a production app, and I love it. Great work. :)
I've previously been using jansi and some hand-rolled cursor manipulation for my apps, and need to write multi-coloured strings and e.g. hyperlinks to the console. Do you think there's any chance you might allow this kind of output via kotter? Thanks very much.
Some sample code I use...
val String.ansi
  get() = Ansi.ansi().render(this).toString()

val msg = "@|yellow restoring session|@ @|green $id |@".ansi

fun makeConsoleHyperlink(url: String, text: String, plain: Boolean = false) = if (plain) "$text ($url)" else makeOsc8Hyperlink(url, text)

fun makeOsc8Hyperlink(url: String, text: String) = "\u001B]8;;$url\u001B\\$text\u001B]8;;\u001B\\"

Hi. I just used kotter for the first time in a production app, and I love it. Great work. :)

Wow, thank you so much! I hope it was fun to use and is holding up for you in production.

... need to write multi-coloured strings ...

Running across the @|...| syntax in Ansi and not liking it was one of the things that motivated me to write Kotter in the first place :). I found that syntax somewhat bulky, fragile to typos, hard to read in longer strings, and annoying once you needed to start nesting.
So I wouldn't put support for it in the main library. That said, it might be possible for me to create a kotterx module which adds extension methods for working with Ansi formatted strings. So in that case you'd be able to do something like:
section {
   "@|yellow restoring session|@ @|green $id|@".renderInto(this)
}.run { ... }

I wouldn't be able to prioritize working on that for a while. Would you be amenable for now to just extending RenderScope in your codebase?
fun RenderScope.renderMessage() {
  yellow { text("restoring session") }
  text(' ')
  green { text(id) }
}

This is a bit more verbose for sure but clearer and you can mix & match fg / bg / text effects together.
However, if you really wanted to use Ansi formatted strings and if you're feeling adventurous, you might try implementing that extension method yourself in your own codebase. It would look like this:
private class Chunk(val text: String, val color: Color? = null)

// e.g. "@|yellow restoring session|@ @|green $id|@" produces
// listOf(Chunk("restoring session", Yellow), Chunk(" "), Chunk("$id", Green))
private fun String.parseIntoChunks(): List<Chunk> {
    // TODO: The hard part goes here
}

fun String.renderInto(renderScope: RenderScope) {
   val chunks = this.parseIntoChunks()
   renderScope.apply {
       scopedState {
          for (chunk in chunks) {
             chunk.color?.let { color(it) } ?: clearColor()
             text(chunk.text)
          }
      }
   }
}

(The above is written from memory so I can't guarantee it would actually work without additional tweaks)

hyperlinks to the console.

I'm honestly unfamiliar with OSC sequences so I'd have to look into them more. I saw that they're an extension before so I didn't really pursue them.
By the way, I use hyperlinks in my own projects and it seems like all the terminals I've tried handle clicking on them if you hold CTRL / CMD down.
Here's a screenshot from my other project Kobweb:

and here's the link to the code that renders it.
Is there anything that OSC hyperlinks give you that I'm missing?

I found that syntax somewhat bulky, fragile to typos, hard to read in longer strings, and annoying once you needed to start nesting

Completely fair. It was all I had so it was what I used. For the first app I'm converting, using your recommended RenderScope style is perfectly adequate. I'll see how things turn out as I convert others.

Nevermind I figured it out shortly

: ) Yep, I've got some long urls (e.g. with GUIDs) in them that benefit from browser style link rendering.
I use iTerm, the one terminal to rule them all, so I'm spoilt for features. But I do have users using Gnome and Windows Terminal, so I need to keep them in mind.
I'll let you know how my kotter adventures go. Thanks again.

I'll see how things turn out as I convert others.

I appreciate your feedback. Feel free to keep letting me know how it goes. I've been mostly working in a bubble so it's very useful for me.

I use iTerm...

Yeah, when I make changes I test on ...
Linux: the default terminal, Konsole
Mac: the default terminal, iTerm
Windows: cmd, powershell, Windows Terminal
If hyperlinks work on all of those then I'll definitely implement them, probably even soon-ish (but no promises!)

I'm removing this issue as a 1.0 blocker.
I may still work on it before then, but I feel like this library is still fine without the feature. A user likely won't try to write ANSI escape codes into textLine unless they know what they're doing, and if they break their program because of it, they can just back out that code.
Also, leaving the ability to write ansi codes into textLine may be a secret way to allow people to add features that I myself can't support (or choose not to support because the feature isn't standard across enough terminals).

I'm going to go ahead and close this issue. If users actually run into problems with using ANSI commands in the actual Kotter programs, then I'll revisit it.

authors: bitspittle cbcmg

repo: varabyte/kotter


text:
Unbuild Stub breaks in Vue Vite application

Relates to https://github.com/unjs/unbuild/pull/300
When running unbuild --stub in the vue-shining-text package, the Vue Playground breaks by raising:
[vite] Internal server error: Failed to resolve entry for package "vue-shining-text". The package may have incorrect main/module/exports specified in its package.json.

That worked, @pi0 ! Thank you!! You said:

By creating a top level .mjs entry, we can trick vite into resolving .ts (stubbed) files and also have a valid production package.

Why a valid production package must have an index.mjs outside of src?

It is because is shared between stub mode and production. Otherwise you could directly point to dist/index.mjs

@pi0 thank you for the help! Learned a lot

repo: vargasmesh/shining-text


text:
Alchemy intersection overlay isn't working

Can't say why but at some point the intersection overlay stopped showing up. I tried resetting the settings and reinstalling the add on.

same issue

I'm running into the same issue

Thanks for reporting this! I suspect this broke around the time they split out the enchantments into their own sub-interface.
I will try to resolve this soon, it may take me an extra day or two since I haven't set up my development environment on this new laptop.

I have fixed this bug with this commit, awaiting RuneLite to pull in the newest version.

It looks like some of the APIs used are deprecated now, reopening this until that is fixed. Thank you for your patience.

I resolved the deprecated API usage last night, once again awaiting RuneLite to accept the plugin changes.

Fix is live!! thanks again for reporting the issue, I will try to address any breaking changes faster in the future.

repo: vartan/abc-alch


text:
Server and incoming-endpoint support

vcabbage currently only acts as a client, and does not support incoming lines
Add support for listening on a server socket and accepting incoming links and sessions (for both client and server connections)
PR coming shortly to show a proposed API.

Awesome! :+1:

Work on this is starting in #178

authors: alanconway vcabbage

repo: vcabbage/amqp


text:
Fallible only types

This is based on https://github.com/vcombey/fallible_collections/pull/3, so you can ignore the first commit for now and just look at https://github.com/vcombey/fallible_collections/commit/7e62b06ec26420c9f40cbe847830e96bff379ff1. I'll rebase after https://github.com/vcombey/fallible_collections/pull/3 is merged, but I wanted to put this here since I've already completed the work.

we could also implement TryClone for TryVec, TryBox... what do you think ?

we could also implement TryClone for TryVec, TryBox... what do you think ?

Sounds good! Done in https://github.com/vcombey/fallible_collections/pull/4/commits/57ed9a3e82ab0fa1b5f625afa5428c1d75530f44

I think I've addressed all your feedback. I'll need to rebase this after https://github.com/vcombey/fallible_collections/pull/3 merges, but I wanted to wait on that until we're done reviewing the changes here since the force push required destroys the continuity of the review conversation.

I rebased this and added some tests for try_clone. Once you merge this, can you publish a new version to crates.io? I think that's all I should need on your side to continue with https://bugzilla.mozilla.org/show_bug.cgi?id=1624698.

authors: baumanj vcombey


text:
⚠ Spryr has degraded performance

In 3d66656, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 3739 ms

Resolved: Spryr performance has improved in 9ef4be2 after 7 minutes.

repo: vcsphere/upptime


text:
⚠ Spryr has degraded performance

In af3e860, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 7835 ms

Resolved: Spryr performance has improved in ddd7ad8 after 11 minutes.


text:
Hiding results until typing starts

Im actually looking for something like that that doesn't show results until typing starts. I wonder can this be modified for this functionality?
Very nice work.

At version [v0.6.1] (https://github.com/vdw/HideSeek/tree/v0.6.1) you can set the option "hidden_mode" to true, in order to list the results rather to filter them, when you type.

authors: jogoeire vdw

repo: vdw/HideSeek


text:
Questions;

does anyone know if SDL2 is available on IOS and Android ?.
I was reading about how SDL was used for IOS and Android here (https://google.github.io/pienoon/pie_noon_guide_engine.html), but i am curious is SDL2 is also available on these mobile platforms.
Golang can compile to Android, and soon IOS.

All you need to do to check weather a specific backend is supported, is to download the sourcecode, and check for the platforms that are actually there. And yes SDL2 is available on those platforms.

Great.
Will give it a shot. Thank you very much

Can you please tell how well it turned out with go? Would be nice to read some practical experince.

For sure. I am setting up ios and android now. Not sure how well that will flow since ios is very raw.

Any new updates?


text:
C.free requires // #include <stdlib.h>

On Windows, every time you use C.free you require // #include <stdlib.h>.

Can we reopne this issue. Currently go-sdl2 does not build in windows because #include <stdlib.h> is needed by below files
$ grep -R "C.free" go-sdl2/
go-sdl2/sdl/audio.go:   defer C.free(unsafe.Pointer(_driverName))
go-sdl2/sdl/audio.go:   defer C.free(unsafe.Pointer(_device))
go-sdl2/sdl/audio.go:   defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl/audio.go:   defer C.free(unsafe.Pointer(_rb))
go-sdl2/sdl/clipboard.go:       defer C.free(unsafe.Pointer(_text))
go-sdl2/sdl/filesystem.go:      defer C.free(unsafe.Pointer(_org))
go-sdl2/sdl/filesystem.go:      defer C.free(unsafe.Pointer(_app))
go-sdl2/sdl/gamecontroller.go:  defer C.free(unsafe.Pointer(_mappingString))
go-sdl2/sdl/gamecontroller.go:  defer C.free(unsafe.Pointer(_pchString))
go-sdl2/sdl/gamecontroller.go:  defer C.free(unsafe.Pointer(_pchString))
go-sdl2/sdl/hints.go:   defer C.free(unsafe.Pointer(_name))
go-sdl2/sdl/hints.go:   defer C.free(unsafe.Pointer(_value))
go-sdl2/sdl/hints.go:   defer C.free(unsafe.Pointer(_name))
go-sdl2/sdl/hints.go:   defer C.free(unsafe.Pointer(_value))
go-sdl2/sdl/hints.go:   defer C.free(unsafe.Pointer(_name))
go-sdl2/sdl/joystick.go:        defer C.free(unsafe.Pointer(_pszGUID))
go-sdl2/sdl/joystick.go:        defer C.free(unsafe.Pointer(_pchGUID))
go-sdl2/sdl/keyboard.go:        defer C.free(unsafe.Pointer(_name))
go-sdl2/sdl/keyboard.go:        defer C.free(unsafe.Pointer(_name))
go-sdl2/sdl/loadso.go:  defer C.free(unsafe.Pointer(_sofile))
go-sdl2/sdl/loadso.go:  defer C.free(unsafe.Pointer(_name))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/log.go:     defer C.free(unsafe.Pointer(cstr))
go-sdl2/sdl/rwops.go:   defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl/rwops.go:   defer C.free(unsafe.Pointer(_mode))
go-sdl2/sdl_image/sdl_image.go: defer C.free(unsafe.Pointer(_type))
go-sdl2/sdl_image/sdl_image.go: defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl_image/sdl_image.go: defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl_image/sdl_image.go: C.free(unsafe.Pointer(_xpm))
go-sdl2/sdl_image/sdl_image.go: C.free(unsafe.Pointer(_file))
go-sdl2/sdl_mixer/sdl_mixer.go: defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl_mixer/sdl_mixer.go: defer C.free(unsafe.Pointer(_rb))
go-sdl2/sdl_mixer/sdl_mixer.go: defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl_mixer/sdl_mixer.go: defer C.free(unsafe.Pointer(_command))
go-sdl2/sdl_mixer/sdl_mixer.go: defer C.free(unsafe.Pointer(_paths))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_err))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_file))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_text))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_text))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_text))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_text))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_text))
go-sdl2/sdl_ttf/sdl_ttf.go:     defer C.free(unsafe.Pointer(_text))

Or we can just put it in "sdl_*_wrapper.h" files.

I put #include <stdlib.h> on the wrapper files. Does it work?

:+1:

Cool, I'll be closing this issue again then!

authors: fire jackyb tapir


text:
go get github.com/veandco/go-sdl2/{img, mix} fails

When running in bash getting this error.
In file included from go/src/github.com/veandco/go-sdl2/img/sdl_image.go:5:0:
./sdl_image_wrapper.h:5:11: fatal error: SDL_image.h: No such file or directory
  #include <SDL_image.h>
                ^~~~~~~~~~~~~

In file included from go/src/github.com/veandco/go-sdl2/mix/midi.go:6:0:
./sdl_mixer_wrapper.h:4:11: fatal error: SDL_mixer.h: No such file or directory
  #include <SDL_mixer.h>
           ^~~~~~~~~~~~~

Hi @CarterScadden, what platform are you on? Did you install the native libraries for SDL_image and SDL_Mixer?

Yes sorry, I've resolved the issue didn't realize I needed to install those libraries from else where. Thank you

authors: CarterScadden veeableful


text:
Fix The application badge should be updated even if the device is off… #531

Fix the badge update when the device is offline
Update of the SDK lib with its last version

The invited rooms are not counted to update the badge (need to check if the dedicated rule is enabled / disabled)

authors: pedroGitt ylecollen

repo: vector-im/vector-android


text:
[Bug]: Unintended Description Formatting

Is there an existing issue for this?

[X] I have searched the existing issues

Project Name
WinGet Automation
What happened?
I'm not sure if this is an issue from WinGet Automation or Komac, but one of them is splitting every sentence into new lines in the Description field of the manifest, ending up too many paragraphs.
For example:
https://github.com/microsoft/winget-pkgs/pull/116460/files#diff-8daa0413cffc563ee1bbd60ecfd15bf0906bbc9812d97aec069331b01de795d5R17-R23
There were only 4 paragraphs in the description field, but now there are 7.

It's a Komac bug @russellbanks

This is intentional for description formatting to avoid really long lines with multiple sentences. Each sentence is put on a new line to make it more readable and formatted.
If you don't want it, I could add a toggle to Komac for this behaviour?

@SpecterShell

Sorry for late reply. I prefer not as it could break the structure of the text, especially for those with cascading lists such as the one in Redisant.RabbitMQAssistant. 🤔
What do you mean by "making it more readable and formatted"? It may look good in terminal but strange in GUI or webpage (if exist). 🤔
BTW Does it also affect ReleaseNotes? In this PR part of the text disappeared after "updating".

BTW Does it also affect ReleaseNotes? In this PR part of the text disappeared after "updating".

I think the release notes formatter has missed that part. Rest everything is fine, I guess.
/cc @russellbanks

Another example for ReleaseNotes from https://github.com/microsoft/winget-pkgs/pull/115107, where some whitespaces were replaced by another character.

@russellbanks


text:
[New Package]: Citrix Workspace

List the PackageIdentifier of the package to be added to automation
Citrix.Workspace
Details about the application
Citrix Workspace is an application used for remote access in many companies. As the package already exists in WinGet repo (but it's outdated), all the data which is there can be reused like description.
https://github.com/microsoft/winget-pkgs/tree/master/manifests/c/Citrix/Workspace/21.9.1.4048
New version numbers can be found here: https://www.citrix.com/pt-br/downloads/workspace-app/windows/workspace-app-for-windows-latest.html
Installer URL seem to be available using this pattern:

https://downloadplugins.citrix.com/ReceiverUpdates/Prod/Receiver/Win/CitrixWorkspaceApp21.12.1.4030.exe
Where 21.12.1.4030 is the version.

I guess I should switch it to webpage scraping or find the new URL where latest versions are posted.

@allcontributors please add @felipecrs for ideas

@allcontributors please add @felipecrs for bugs

Thanks a lot for the consideration, @vedantmgoyal2009!
By the way, up to now the XML file still wasn't updated. I think we can indeed consider that it's not the best place to look for updates any longer.
Meanwhile, the package got upgraded in WinGet (manually, I guess): https://github.com/microsoft/winget-pkgs/pull/40503
But this is purely informative, do not consider this comment as a reason to rush the fix or implementation. Perhaps when Citrix releases the next version, I can give it a chance to send a PR.

@felipecrs I have switched to webpage scraping. Now, as a new version is released, automatic PR should be created. Sorry for the delay.

That's very nice!
And don't say sorry, I that thank you!


text:
Distinguish between "script error" and "system failure"

We use Gitlab’s retry:when: rule with runner_system_failure to retry jobs when they fail due to an infrastructure problem, and we also have metrics and alerts for system failures that depend on Gitlab's classifcation. So far, using the anka-cloud-gitlab-executor, all failures (including system failures) return ERROR: Job failed: exit status 1 which registers in Gitlab as a script error. When using the anka-gitlab-runner instead, these errors were classified correctly in Gitlab.
For example, a recent job ended with this output:
2024/08/19 20:22:18 instance 16210410-9555-42d7-42a8-3a6c6740be8c is in state "Scheduling"
2024/08/19 20:22:21 instance 16210410-9555-42d7-42a8-3a6c6740be8c is in state "Error"
2024/08/19 20:22:21 error: failed to wait for instance "16210410-9555-42d7-42a8-3a6c6740be8c" to be scheduled: instance 16210410-9555-42d7-42a8-3a6c6740be8c is in an unexpected state: Error
ERROR: Job failed: exit status 1

When we query the Gitlab API for this job, we would expect the field "failure_reason" to have the value "runner_system_failure", but instead it comes back as "script_failure".
In our research of the problem, we came across these docs about how to send exit codes from a custom executor to Gitlab such that it appears as a system failure.

Fortunately it looks like our dev team added a bit of support for this:
	if err := command.Execute(ctx); err != nil {
		log.Printf("error: %s", err)
		if errors.Is(err, gitlab.ErrTransient) {
			return systemFailureExitCode
		}
		return buildFailureExitCode
	}

so, for failed to wait for instance, we'd need to use gitlab.TransientError to get it to do a system failure.
Seems fairly straight forward. I'll see if we can get a patch out soon.

authors: NorseGaud jnimis

repo: veertuinc/anka-cloud-gitlab-executor


text:
Error when user is clicking on the filter between tabs

Description
Error when user is clicking on the filter between tabs
Steps to Reproduce

Go to All orders tab click on status filter
Click on Closed orders click on status filter
See error

Expected behavior
No error should be visible
Screenshots
https://github.com/vegaprotocol/frontend-monorepo/assets/119658839/981a3fa2-48a8-4b55-b40a-8366485fd695

@daro-maj its possible that this has been resolved after recent ag grid upgrades

repo: vegaprotocol/frontend-monorepo


text:
Fix macro for Zeppelin

Fixes macro for Zeppelin (wrong type signature of DisplayUtils.html)
Update docs to describe how ShowRender is used in manual cases

Codecov Report

Merging #99 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master     #99   +/-   ##
======================================
  Coverage    70.3%   70.3%
======================================
  Files          27      27
  Lines        1785    1785
  Branches        6       6
======================================
  Hits         1255    1255
  Misses        530     530

Impacted Files
Coverage Δ

...src/main/scala/vegas/macros/ShowRenderMacros.scala
0% <ø> (ø)
:white_check_mark:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d57128...a3cf386. Read the comment docs.

LGTM. Thanks.

authors: codecov-io dbtsai jeremyrsmith

repo: vegas-viz/Vegas


text:
Colorblindness picture previewer

Is your feature request related to a problem? Please describe.
As a developer or designer who have to provide a software/website that is inclusive to people with color blindness, I have difficulty realizing how much my graphics are visible to these people.
Describe the solution you'd like
Provide a tool in which we would import an image or paste a screenshot and apply a filter that would simulate how people with color blindness would see it.

Sample code: https://github.com/DaltonLens/libDaltonLens/blob/master/libDaltonLens.c

repo: veler/DevToys


text:
Typescript: Cannot find module 'aws-lambda' or its corresponding type declarations.

I get this error from src/configure.d.ts when using typescript:

node_modules/@vendia/serverless-express/src/configure.d.ts:2:25 - error TS2307: Cannot find module 'aws-lambda' or its corresponding type declarations.

I don't see aws-lambda in the package.json at all. I was able to get it to build by adding @types/aws-lambda as a devDependency.
@vendia/serverless-express: 4.3.2
typescript: 4.1.5

Sorry about that. Could you send a PR?

After thinking about this more, I'm not sure how this should be addressed. It seems odd to define @types/aws-lambda as a dependency for everybody to pull down if not everyone is using typescript. Thooughts?

@types/aws-lambda is currently listed in devDependencies in this package.
I'm not sure what the correct way to solve this is though since as you said we don't want to stick it in dependencies and force JS users to install types. Surely this problem has been solved before... 🤔

One option would be to make typescript users install it themselves and make a note to do so. I just had this issue myself.

I had this issue too, I can see a few solutions:

You could just add it as a peerDependency. Consumers can choose to put it into their devDependencies that way.
Just put it into the module tree (in dependencies). It's not a perfect solution.
You don't return aws-lambda types, instead you return your own declared type. I can't speculate how many users need access to the type is unknown, but they can always overwrite it in consumer

I'll put a proposal forward of what I think works, please provide feedback.

just bumping this as it's still an issue which I'm facing. Adding the dependencies into my project's module tree did give an ad-hoc fix to the error.

authors: Alko89 brettstack chav-aniket eastwood shawnsparks-work

repo: vendia/serverless-express


text:
Fix URL double encoding

[ ] @eliperkins
[x] @dasmer

CMDQueryStringSerialization’s queryStringWithDictionary already does URL encoding, so we were percent escaping percent escapes. Ran into some issues with pagination on the requests endpoint as a result.

Ah, Travis isn’t happy. I think I need to update one of the tests. This is what happens when I make a change from the GitHub website. :speak_no_evil:

OK, looked into it further, and it looks like we were doubly encoding to get around array encoding (although a very incorrect way to get around it). It looks like we don’t pass arrays as parameters anywhere in the API, so it’s safe to remove that case in favor of handling the common case. Might have to look at array encoding more later though.

repo: venmo/VENCore


text:
Experiment with micro-controller support for Veracruz

At the moment Veracruz client code (Durango) is designed and built for use on an application-class microprocessor (e.g. an Arm A-core).  However, there are potential use-cases where microcontrollers could "talk" directly to the trusted Veracruz runtime.  To support this, we need:

Some compelling use-cases to act as guides for implementation.
A version of Durango that is usable on a resource-constrained device.
Additional examples, tied to the use-cases highlighted above.

Duplicate of #41 (which has more info)

authors: dominic-mulligan-arm dreemkiller

repo: veracruz-project/veracruz


text:
Argument 1 passed to craft\elements\db\ElementQuery::enabledForSite() must be of the type bool, null given

As of Craft CMS v3.4.6.1 while using the current version of the plugin available through this repo, I am seeing an error returned when attempting to add an entry to a Many to Many field.
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
/index.php?p=admin/actions/element-indexes/get-elements&v=1582172064925:1

error: "Argument 1 passed to craft\elements\db\ElementQuery::enabledForSite() must be of the type bool, null given, called in ~/vendor/craftcms/cms/src/elements/db/ElementQuery.php on line 516"

Application Info
PHP version	7.3.14
OS version	Linux 3.10.0-957.27.2.el7.x86_64
Database driver & version	MySQL 5.7.29
Image driver & version	GD 7.3.14
Craft edition & version	Craft Pro 3.4.6.1

Updated because I was clicking through and the error I saw before was incorrect due to direct access of the endpoint.

This can be corrected by updating line 10 in input.js to:
criteria: {status: null, localeEnabled: false},

localeEnabled is actually deprecated so it should be:
criteria: {status: null, enabledForSite: false},

Fixed in 2.0.0

authors: engram-design matthisamoto

repo: verbb/many-to-many


text:
Search functionality does not work due to API limitations

In the getAllProducts() function, there is no logic to support Shopify's pagination requirement.
As a result, the store can only search through the first 250 products.

For anyone with the same issue, I added a new function to shopify JS like this --
`
export async function getProductsByTitle(title) {
let query = `
{
products(first:25, query: "title:${title}*") {
edges {
node {
id
handle
title
priceRange {
maxVariantPrice {
amount
currencyCode
}
minVariantPrice {
amount
currencyCode
}
}
images(first: 1) {
edges {
node {
originalSrc
altText
width
height
}
}
}
}
}
}

}
`
return shopifyFetch({
query: query,
})
}`
This doesn't scale if there are a lot of products because of API limitations, but this provides a partial solution to a more accurate search functionality. Maybe consider looking into the Bulk operations to get a real answer to this.

repo: vercel/sveltekit-commerce


text:
0.1.15-beta.0 regression in ssr with initialData: staleness thing doesnt refetch. works fine in 0.1.15

as described, will add a demo asap

the problem for us is that in 0.1.16 initialData is behaving more or defaultData or fallbackData

PR with a code https://github.com/iamstarkov/swr/pull/2
notice how Pokemon profile doesnt change https://zeit-swr-230-demo.iamstarkov.now.sh/demo
with a workaround it does change https://zeit-swr-230-demo.iamstarkov.now.sh/workaround

workaround in the meantime:
const useFixedSWR = (key, fetcher, {initialData, ...config} = {}) => {
  const initial = React.useRef(initialData);
  React.useEffect(() => {
    if(key){
      initial.current = undefined;
    }
  }, [key]);
  return useSWR(key, fetcher, {...config, initialData: initial.current});
}

the problem doesnt exist in 0.1.15

PR with a code https://github.com/iamstarkov/swr/pull/3
notice how Pokemon profile does change https://zeit-swr-230-demo-0115.iamstarkov.now.sh/demo

Looks like regression was introduced in 0.1.15-beta.0

PR with a code https://github.com/iamstarkov/swr/pull/4
notice how Pokemon profile does not change anymore zeit-swr-230-demo-0115.iamstarkov.now.sh/demo

this is the diff https://github.com/zeit/swr/compare/0.1.15...v0.1.15-beta.0

#211 is also in the diff, so maybe maybe

#211 with #186 are both in the diff, so i dunno

I think this PR is issue is not well formatted and described. It might make sense to open a new one with a concise description and not clutter it with references.

I dont agree that is "not well formatted and described". Following sentence describes the problem perfectly:

the problem is that in 0.1.16 initialData is behaving more or defaultData or fallbackData

in regards to reference, I dont control em

authors: iamstarkov sambokai

repo: vercel/swr


text:
[Turborepo] Add a with-docker-pnpm example

Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
pnpm is the package manager of the other examples so it's weird that the with-docker example uses yarn.
It would be nice to have a with-docker-pnpm example too.
Describe the solution you'd like
The solution should use pnpm fetch which is the recommended way to use pnpm with docker
Describe alternatives you've considered
I was able to create a version with pnpm but it doesn't use pnpm fetch so I don't think it's the best way to use it

Here's my working version with pnpm. I just copied the example with yarn and replaced it with pnpm
FROM node:18-alpine AS base

FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
RUN npm install -g turbo
COPY . .
RUN turbo prune --scope=docs --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
RUN corepack enable
RUN pnpm install --frozen-lockfile

# Build the project
COPY --from=builder /app/out/full/ .
RUN pnpm dlx turbo run build --filter=docs

FROM base AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=installer /app/apps/docs/next.config.js .
COPY --from=installer /app/apps/docs/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/docs/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/docs/.next/static ./apps/docs/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/docs/public ./apps/docs/public

CMD node apps/docs/server.js

Hi, here is my version. Please let me know if there is any way to improve it.
FROM node:18.16.0-alpine3.17 AS base
ARG PNPM_VERSION=8.6.2
ENV HUSKY=0
ENV CI=true
ENV PNPM_HOME=/usr/local/bin

RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate
WORKDIR /app

FROM base AS setup
RUN pnpm add -g turbo
COPY . .
RUN turbo prune --scope=@acme/docs --docker

FROM base AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --update --no-cache libc6-compat && rm -rf /var/cache/apk/*

COPY .gitignore .gitignore
COPY --from=setup /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=setup /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=setup /app/out/full/patches ./patches
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch
 # ↑ By caching the content-addressable store we stop downloading the same packages again and again

# First install dependencies (as they change less often)
COPY --from=setup /app/out/json/ ./
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
 pnpm install --filter=@twinops/delivery-webapp... -r --workspace-root --frozen-lockfile \
 --unsafe-perm \
 # ↑ Docker runs pnpm as root and then pnpm won't run package scripts unless we pass this arg
 | grep -v "cross-device link not permitted\|Falling back to copying packages from store"
 # ↑ Unfortunately using Docker's 'cache' mount type causes Docker to place the pnpm content-addressable store
 # on a different virtual drive, which prohibits pnpm from symlinking its content to its virtual store
 # (in node_modules/.pnpm), and that causes pnpm to fall back on copying the files.
 # And that's fine!, except pnpm emits many warnings of this, so here we filter those out.

# Build the project and its dependencies
COPY --from=setup /app/out/full/ ./
COPY turbo.json turbo.json
RUN pnpm run build --filter=@acme/docs...

FROM base AS dev
COPY --from=builder /app/ ./
WORKDIR /app/apps/docs

FROM builder AS pruned
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
 pnpm --filter=@acme/docs --prod deploy pruned --config.ignore-scripts=true

FROM node:18.16.0-alpine3.17 AS runner
WORKDIR /app
COPY --from=pruned /app/pruned/ ./

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nodejs
USER nodejs
EXPOSE 8080

CMD ["node", "./dist/server.js"]

@nicu-chiciuc I think this issue should be elevated, since the only reason I've chosen pnpm is that the official docs recommend using it:

That's exactly my point here. The Docker examples were made with yarn but the rest of the docs and other examples use and recommend pnpm.

For posterity sake, here's how I made it work for me:
The most important part was this comment: https://github.com/vercel/turbo/issues/1997#issuecomment-1273565773
Basically I had to also add
**/node_modules

to my .dockerignore file (I already had node_modules)
Before adding **/node_modules I had issue on the COPY --from=builder /app/out/full/ . step.
And here's my current Dockerfile:
FROM node:20 as base
    # Update apt-get and install the necessary libraries
    # This is mainly so that the `canvas` package can be installed
    RUN apt-get update && \
        apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

FROM base AS builder
    WORKDIR /app

    ENV APP_NAME=my_secret_project

    # This might be necessary when switching to alpine
    # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
    # RUN apk add --no-cache libc6-compat

    RUN npm install -g turbo

    COPY . .

    RUN turbo prune --scope=@my_secret_org/${APP_NAME} --docker

FROM base as installer
    WORKDIR /app
    ENV APP_NAME=my_secret_project

    RUN npm install -g pnpm
    RUN npm install -g turbo

    # First install dependencies (as they change less often)
    COPY .gitignore .gitignore
    COPY --from=builder /app/out/json/ .
    COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
    RUN pnpm install

    # Build the project and its dependencies
    COPY --from=builder /app/out/full/ .
    COPY turbo.json turbo.json

    # Uncomment and use build args to enable remote caching
    # ARG TURBO_TEAM
    # ENV TURBO_TEAM=$TURBO_TEAM

    # ARG TURBO_TOKEN
    # ENV TURBO_TOKEN=$TURBO_TOKEN

    RUN turbo run build --filter=@my_secret_org/${APP_NAME}...

FROM base AS runner
    WORKDIR /app
    ENV APP_NAME=my_secret_project

    RUN npm install -g pnpm

    # Don't run production as root
    # RUN addgroup --system --gid 1001 expressjs
    # RUN adduser --system --uid 1001 expressjs

    # USER expressjs
    COPY --from=installer /app .

    # TODO: Maybe use the npm script?
    CMD pnpm --filter "@my_secret_org/${APP_NAME}" run start

I know that this dockerfile is much less optimized than the versions in other comments.
I've used node:20 instead of an alpine version since my plan is to (probably) make it work in a dev-container and I assume I'll need a full-fledged version.
And I also wanted to make it simple/clear enough so that I can change it if necessary.

And now I realize that I've used FROM base for all steps 🤦♂ and I'll have to fix it.

I created https://github.com/vercel/turbo/pull/5536, I think it should solve the issue.

I came across this issue today looking for some insights around a missing lockfile in the out/json directory where pnpm-workspace.yaml is copied.
➜  tree out -L 3
out
├── full
│   ├── apps
│   │   └── frontend
│   ├── package.json
│   ├── packages
│   │   ├── constants
│   │   ├── discord
│   │   ├── features
│   │   ├── github
│   │   ├── prisma-client
│   │   ├── scripts
│   │   ├── support
│   │   └── type-helpers
│   ├── pnpm-workspace.yaml
│   └── turbo.json
├── json
│   ├── apps
│   │   └── frontend
│   ├── package.json
│   ├── packages
│   │   ├── constants
│   │   ├── discord
│   │   ├── features
│   │   ├── github
│   │   ├── prisma-client
│   │   ├── scripts
│   │   ├── support
│   │   └── type-helpers
│   └── pnpm-workspace.yaml
├── pnpm-lock.yaml
└── pnpm-workspace.yaml

I also noticed a few comments here show patches getting captured as well. Are y'all adding that directory as a workspace?
I've been tinkering with a pnpm+turbo+docker setup for the past few days and here's what I've noticed:

pnpm prune doesn't ignore lifecycle scripts. be careful how you structure your npm scripts for when you're pruning the virtual store for the final build image
when using pnpm fetch, I originally did not think it supported --ignore-scripts but apparently it does! I'd recommend adding that. If any of the installed dependencies have a postinstall step that calls a transient dependencies bin then it will fail without --ignore-scripts.
if you do not install turbo globally with npm you will either need to set up the pnpm global scope, or run via pnpm dlx which doesn't seem to cache well (10s+ on each build)

when running dlx pnpm will unfortunately not load turbo from the virtual store but rather the registry which is likely the cause for the delay on build

In my experience pnpm and turbo seem to have conflicting approaches to building a docker image.
pnpm fetch is exclusive to pnpm and fetches all dependencies in the project, loading them into the virtual store. This caches well and has a negligible impact to build time.
turbo prune ... --docker will generate a pruned lockfile, which we can then use pnpm fetch on (but we need turbo installed first`)
What I've landed on is to use turbo for building only with a mix of pnpm deploy:
#syntax=docker/dockerfile:1.4
ARG NODE_VERSION="18.15.0"
ARG ALPINE_VERSION="3.17"
FROM --platform=linux/amd64 node:${NODE_VERSION}-alpine${ALPINE_VERSION} as base
# for turbo - https://turbo.build/repo/docs/handbook/deploying-with-docker#example
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /workspace
# enable corepack for pnpm
RUN corepack enable

FROM base as fetcher
# pnpm fetch only requires lockfile, but we'll need to build workspaces
COPY pnpm*.yaml ./
COPY patches ./patches
# mount pnpm store as cache & fetch dependencies
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm-store \
  pnpm fetch --ignore-scripts

FROM fetcher as builder
WORKDIR /workspace
COPY . .
RUN --mount=type=secret,id=env,required=true,target=/workspace/.env \
  pnpm install --frozen-lockfile --offline --silent
# build app
RUN --mount=type=secret,id=env,required=true,target=/workspace/.env \
  --mount=type=cache,target=/workspace/node_modules/.cache \
  pnpm turbo run build --filter="frontend"

FROM builder as deployer
WORKDIR /workspace
# deploy app
RUN pnpm --filter ./apps/frontend deploy --prod --ignore-scripts ./out

FROM base as runner
WORKDIR /workspace
# Don't run production as root
RUN addgroup --system --gid 1001 mygroup
RUN adduser --system --uid 1001 myuser
USER amplifyuser
# copy files needed to run the app
COPY --chown=myuser:mygroup --from=deployer /workspace/out/package.json .
COPY --chown=myuser:mygroup --from=deployer /workspace/out/node_modules/ ./node_modules
COPY --chown=myuser:mygroup --from=deployer /workspace/out/build/ ./build
# start the app
CMD pnpm run start

This results in a ~650MB build image in a relatively small monorepo and ~300s builds with no cache. Half of that docker build time is actually from turbo build. Have y'all figured out how to use the .turbo cache in the build effectively (with buildkit cache or otherwise -- afaict I'm not ignoring .turbo dirs)?

Had same problem on COPY --from=builder /app/out/full/ . line as everyone else using pnpm.
Added **/node_modules to root .dockerignore to resolve.
Then ran into issues with the last 3 COPY lines. Needed to also copy the next.config.js from the with-docker example. tldr- I was missing output: standalone
Ended up with this. I like it because pnpm and turbo are pulled to "base", allowing me to just use bare alpine in the end result.
copied from the with-docker example and updated to use pnpm.
# src Dockerfile: https://github.com/vercel/turbo/blob/main/examples/with-docker/apps/web/Dockerfile
FROM node:18-alpine AS alpine

# setup pnpm on the alpine base
FROM alpine as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN pnpm install turbo --global

FROM base AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
COPY . .
RUN turbo prune --scope=web --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

# Uncomment and use build args to enable remote caching
# ARG TURBO_TEAM
# ENV TURBO_TEAM=$TURBO_TEAM

# ARG TURBO_TOKEN
# ENV TURBO_TOKEN=$TURBO_TOKEN

RUN turbo run build --filter=web

# use alpine as the thinest image
FROM alpine AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=installer /app/apps/web/next.config.js .
COPY --from=installer /app/apps/web/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public

CMD node apps/web/server.js

Would any of you be interested in making a PR to update the with-docker example? We're ok with switching away from yarn

https://github.com/vercel/turbo/pull/5536 got closed but not merged.  So was the PR not correct and / or what else needs to happen to get the with-docker example updated? Thanks.

Hi all, I've figure out a version for pnpm+turborepo+nextjs(standalone output), please take a look:
FROM node:18-alpine AS base
RUN apk add --no-cache libc6-compat
RUN npm install -g pnpm
RUN npm install -g turbo

FROM base AS pruner
WORKDIR /app

COPY . .

RUN turbo prune {your_app_name} --docker

FROM base as builder
WORKDIR /app

COPY .gitignore .gitignore
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml

RUN pnpm install  --frozen-lockfile

COPY --from=pruner /app/out/full/ .
COPY turbo.json turbo.json

RUN pnpm --filter {your_app_name} --prod deploy full
WORKDIR /app/full
RUN pnpm run build
RUN rm -rf ./.next/cache

FROM base AS runner
WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=builder /app/full/next.config.js .
COPY --from=builder /app/full/package.json .

COPY --from=builder --chown=nextjs:nodejs /app/full/.next .
COPY --from=builder --chown=nextjs:nodejs /app/full/.next/static ./standalone/.next/static
COPY --from=builder --chown=nextjs:nodejs /app/full/public ./standalone/public

CMD node ./standalone/server.js

This result a ~300MB build image.
Basically I just cd into pruned/full folder make by turbo prune and build the app in the folder after executing pnpm deploy (I think it is used to copy real dependency file from pnpm store), and then copy the production code to the root of workdir in my runner stage.

Привет всем, я нашел версию для pnpm+turborepo+nextjs (автономный вывод), пожалуйста, посмотрите:
FROM node:18-alpine AS base
RUN apk add --no-cache libc6-compat
RUN npm install -g pnpm
RUN npm install -g turbo

FROM base AS pruner
WORKDIR /app

COPY . .

RUN turbo prune {your_app_name} --docker

FROM base as builder
WORKDIR /app

COPY .gitignore .gitignore
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml

RUN pnpm install  --frozen-lockfile

COPY --from=pruner /app/out/full/ .
COPY turbo.json turbo.json

RUN pnpm --filter {your_app_name} --prod deploy full
WORKDIR /app/full
RUN pnpm run build
RUN rm -rf ./.next/cache

FROM base AS runner
WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=builder /app/full/next.config.js .
COPY --from=builder /app/full/package.json .

COPY --from=builder --chown=nextjs:nodejs /app/full/.next .
COPY --from=builder --chown=nextjs:nodejs /app/full/.next/static ./standalone/.next/static
COPY --from=builder --chown=nextjs:nodejs /app/full/public ./standalone/public

CMD node ./standalone/server.js

В результате получается образ сборки размером около 300 МБ. По сути, я просто перехожу в обрезанную/полную папку turbo pruneи собираю приложение в папке после выполнения pnpm deploy(я думаю, что оно используется для копирования реального файла зависимостей из хранилища pnpm), а затем копирую рабочий код в корень рабочего каталога в моем бегуне. этап.

Hi! Great job! But for some reason my stats didn't load. Correctly the copying a bit
FROM node:18-alpine AS base
RUN apk add --no-cache libc6-compat
RUN npm install -g pnpm
RUN npm install -g turbo

FROM base AS pruner
WORKDIR /app

COPY . .

RUN turbo prune {your_app_name} --docker

FROM base as builder
WORKDIR /app

COPY .gitignore .gitignore
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml

RUN pnpm install  --frozen-lockfile

COPY --from=pruner /app/out/full/ .
COPY .env.production ./apps/main/.env.production
COPY turbo.json turbo.json

RUN pnpm --filter {your_app_name} deploy full
WORKDIR /app/full
RUN pnpm run build
RUN rm -rf ./.next/cache

FROM base AS runner
WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=builder /app/full/next.config.js .
COPY --from=builder /app/full/package.json .

COPY --from=builder --chown=nextjs:nodejs /app/full/.next .
COPY --from=builder --chown=nextjs:nodejs /app/full/.next/static ./standalone/full/.next/static
COPY --from=builder --chown=nextjs:nodejs /app/full/public ./standalone/full/public

CMD node ./standalone/full/server.js

We've recently updated our with-docker example. Unfortunately, we don't have the bandwidth to create examples for every permutation of package managers (each package manager, each deployment platform, each packaging mechanism, etc.).
Seeing a lot of great chatter here, though, so kudos to the group! Will close as we have examples with both pnpm and Docker, separately, and won't make one with the cross-product.

We've recently updated our with-docker example. Unfortunately, we don't have the bandwidth to create examples for every permutation of package managers (each package manager, each deployment platform, each packaging mechanism, etc.).

Nobody is asking for all that though...just pnpm package manager. Echoing @jvzaniolo, pnpm recommended and used in other examples.

For anybody looking for a solution - I was able to make it work.
I'm using TurboRepo and pnpm - and the difficulty is how pnpm and symlinks are working. Basically, pnpm stores node_modules at root level instead of package level and make references in your specific app to the packages at root level. If you want to understand, you have to look at pnpm docs and check out prune, --filter and --scope.
I wasn't able to run the Dockerfile from the app level ie. /apps/api/Dockerfile for ex. bc my Dockerfile needs to copy files such as turbo.json or pnpm-lock.yaml that are only available at root level. So I named my file like this for simplicity Dockerfile.api. I don't even know how people are able to run Dockerfile from nested apps, given that it always needs a lock (wether it's pnpm or yarn)  file and turbo.json.
Then came the Dockerfile. Basically the difficulty is handling the way pnpm downloads and reference packages in a way that's simple for my specific app, the api to have them available under node_modules.
The end goal is to have a simple folder with api/** where ** is all the necessary node_modules flattened out (ie. no symlinks, just the pure code) and the JS compiled ready to execute. Sounds simple but with monorepo, it can be tough...
So here's my code out below with explanation at each steps
# Base image with Node.js
ARG NODE_VERSION=18.18.0
# Use a specific version of the Node.js Alpine image as the base. Alpine images are minimal and lightweight.
FROM node:${NODE_VERSION}-alpine AS base
# Update the package list and install libc6-compat. This package is often required for binary Node.js modules.
RUN apk update && apk add --no-cache libc6-compat

# Setup pnpm and turbo
# Start a new stage based on the base image for setting up pnpm (a package manager) and turbo (for monorepo management).
FROM base as setup
# Install pnpm and turbo globally using npm.
RUN npm install -g pnpm turbo
# Configure pnpm to use a specific directory for storing its package cache.
RUN pnpm config set store-dir ~/.pnpm-store

# Build argument for specifying the project
# Introduce a build argument 'PROJECT' to specify which project in the monorepo to build.
ARG PROJECT=api

# Install all dependencies in the monorepo
# Start a new stage for handling dependencies. This stage uses the previously setup image with pnpm and turbo installed.
FROM setup AS dependencies
WORKDIR /app
# Copy the essential configuration files and the specific project's files into the Docker image.
COPY packages/ ./packages/
COPY turbo.json ./
COPY package.json turbo.json packages ./
COPY apps/${PROJECT} ./apps/${PROJECT}
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
# Install dependencies as per the lockfile to ensure consistent dependency resolution.
RUN pnpm install --frozen-lockfile

# Prune projects to focus on the specified project scope
# Start a new stage to prune the monorepo, focusing only on the necessary parts for the specified project.
FROM dependencies AS pruner
RUN turbo prune --scope=${PROJECT} --docker
# Remove all empty node_modules folders. This is a cleanup step to remove unnecessary directories and reduce image size.
RUN rm -rf /app/out/full/*/*/node_modules

# Build the project using turbo
# Start a new stage for building the project. This stage will compile and prepare the project for production.
FROM pruner AS builder
WORKDIR /app

# Copy pruned lockfile and package.json files
# This ensures that the builder stage has the exact dependencies needed for the project.
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=pruner /app/out/json/ .

# Install dependencies for the pruned project
# Utilize BuildKit's cache to speed up the dependency installation process.
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfile

# Copy pruned source code
# Bring in the necessary source code to the builder stage for compilation.
COPY --from=pruner /app/out/full/ .

# Build with turbo and prune dev dependencies
# Use turbo to build the project, followed by pruning development dependencies to minimize the final image size.
RUN turbo build --filter=${PROJECT}...
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm prune --prod --no-optional
# Remove source files to further reduce the image size, keeping only the compiled output and necessary runtime files.
RUN rm -rf ./**/*/src

# Final production image
# Start the final stage for the production-ready image.
FROM base AS runner
# Create a non-root user and group for better security.
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nodejs
# Switch to the non-root user.
USER nodejs

WORKDIR /app
# Copy the entire app directory, including node_modules and built code. This includes all necessary runtime files.
COPY --from=builder --chown=nodejs:nodejs /app .

WORKDIR /app/apps/${PROJECT}
# Specify the command to run the application. Adjust the path as needed for your project's start script.
CMD ["npm", "run", "start"]

@nicu-chiciuc The pnpm example is working perfectly can someone guide me how can I pass the env variables to the docker images while running. I tried docker run -p 8080:8080 -e DATABASE_URL="<url-here>" web. But doesn't seem working. Though the env variable is passed to the container. I can see them when I run process.env in the node runtime in the container
This is my turbo.json
{
	"$schema": "https://turbo.build/schema.json",
	"pipeline": {
		"codegen": { "outputs": [] },
		"build": {
			"outputs": ["dist/**", ".next/**"],
			"outputMode": "new-only"
		},
		"lint": { "outputs": [], "outputMode": "errors-only" },
		"lint:fix": { "outputs": [], "outputMode": "errors-only" },
		"prettier": { "outputs": [], "outputMode": "errors-only" },
		"prettier:fix": { "outputs": [], "outputMode": "errors-only" },
		"typecheck": { "outputs": [], "outputMode": "errors-only" },
		"dev": { "cache": false, "persistent": true },
		"start": {
			"dependsOn": ["^build"],
			"cache": false,
			"persistent": true
		},
		"test:dev": { "cache": false }
	}
}

@ezhil56x
it's not clear what specifically doesn't work. You mention

I can see them when I run process.env in the node runtime

is that not the goal of passing the envs?
For my project we use docker-compose and with env_file and environment to set up the necessary env variables, so I'm not sure what happens in other scenarios.

I need to use an env like docker run .. -e

I wrote an article few months ago. It works perfectly for us.
You can check it here
https://fintlabs.medium.com/optimized-multi-stage-docker-builds-with-turborepo-and-pnpm-for-nodejs-microservices-in-a-monorepo-c686fdcf051f
Hope it will help someone 🙂

K

I wrote an article few months ago. It works perfectly for us.
You can check it here
https://fintlabs.medium.com/optimized-multi-stage-docker-builds-with-turborepo-and-pnpm-for-nodejs-microservices-in-a-monorepo-c686fdcf051f
Hope it will help someone 🙂

Have you tried running this dockerfile on GitHub actions?

Nope. I tried it with GitLab CI and locally.

I wrote an article few months ago. It works perfectly for us. You can check it here https://fintlabs.medium.com/optimized-multi-stage-docker-builds-with-turborepo-and-pnpm-for-nodejs-microservices-in-a-monorepo-c686fdcf051f Hope it will help someone 🙂

your article helped a ton. thank you for sharing !

The image on that Article is a bit crap went from 300MB image to 1.3GB image.

The image on that Article is a bit crap went from 300MB image to 1.3GB image.

For me it is 107 MB for a NodeJS microservice built using NestJS

I'm not sure where my issue is.
Most of the dockerfiles posted here give me 1GB images. The only one that gave me a small image was this one:

Had same problem on COPY --from=builder /app/out/full/ . line as everyone else using pnpm.
Added **/node_modules to root .dockerignore to resolve.
Then ran into issues with the last 3 COPY lines. Needed to also copy the next.config.js from the with-docker example. tldr- I was missing output: standalone
Ended up with this. I like it because pnpm and turbo are pulled to "base", allowing me to just use bare alpine in the end result. copied from the with-docker example and updated to use pnpm.
# src Dockerfile: https://github.com/vercel/turbo/blob/main/examples/with-docker/apps/web/Dockerfile
FROM node:18-alpine AS alpine

# setup pnpm on the alpine base
FROM alpine as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN pnpm install turbo --global

FROM base AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
COPY . .
RUN turbo prune --scope=web --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

# Uncomment and use build args to enable remote caching
# ARG TURBO_TEAM
# ENV TURBO_TEAM=$TURBO_TEAM

# ARG TURBO_TOKEN
# ENV TURBO_TOKEN=$TURBO_TOKEN

RUN turbo run build --filter=web

# use alpine as the thinest image
FROM alpine AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=installer /app/apps/web/next.config.js .
COPY --from=installer /app/apps/web/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public

CMD node apps/web/server.js

Does anyone know why this could be happening?

Are you building a NextJS project or NodeJS? For NextJS I haven’t tried yet, but planning to create a Dockerfile and write an article.

I'm building for NextJS.
That would be great.
I guess that's the problem I just copying the whole build instead of just the NextJS built files.

Okay so I've editing this Dockerfile to work will with NextJS

I wrote an article few months ago. It works perfectly for us. You can check it here https://fintlabs.medium.com/optimized-multi-stage-docker-builds-with-turborepo-and-pnpm-for-nodejs-microservices-in-a-monorepo-c686fdcf051f Hope it will help someone 🙂

`
ARG NODE_VERSION=20
Alpine image
FROM node:${NODE_VERSION}-alpine AS alpine
RUN apk update
RUN apk add --no-cache libc6-compat
Setup pnpm and turbo on the alpine base
FROM alpine as base
RUN npm install pnpm turbo --global
RUN pnpm config set store-dir ~/.pnpm-store
Prune projects
FROM base AS pruner
ARG PROJECT
WORKDIR /app
COPY . .
RUN turbo prune --scope=${PROJECT} --docker
Build the project
FROM base AS builder
ARG PROJECT
WORKDIR /app
Copy lockfile and package.json's of isolated subworkspace
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=pruner /app/out/json/ .
First install the dependencies (as they change less often)
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfile
Copy source code of isolated subworkspace
COPY --from=pruner /app/out/full/ .
RUN turbo build --filter=${PROJECT}
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm prune --prod --no-optional
RUN rm -rf ./**/*/src
Final image
FROM alpine AS runner
ARG PROJECT
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nodejs
USER nodejs
WORKDIR /app
COPY --from=builder --chown=nodejs:nodejs /app .
COPY --from=builder --chown=nodejs:nodejs /app/apps/${PROJECT}/next.config.js .
COPY --from=builder --chown=nodejs:nodejs /app/apps/${PROJECT}/package.json .
Automatically leverage output traces to reduce image size
https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nodejs:nodejs /app/apps/${PROJECT}/.next/standalone ./
COPY --from=builder --chown=nodejs:nodejs /app/apps/${PROJECT}/.next/static ./apps/${PROJECT}/.next/static
COPY --from=builder --chown=nodejs:nodejs /app/apps/${PROJECT}/public ./apps/${PROJECT}/public
WORKDIR /app/apps/${PROJECT}
ARG PORT=8080
ENV PORT=${PORT}
ENV NODE_ENV=production
EXPOSE ${PORT}
CMD ["node", "server.js"]
`

Also, avoid setting ENV NODE_ENV production in your Dockerfile as this also sets pnpm install to behave as pnpm install --prod which may not be what you want.

Had same problem on COPY --from=builder /app/out/full/ . line as everyone else using pnpm.
Added **/node_modules to root .dockerignore to resolve.
Then ran into issues with the last 3 COPY lines. Needed to also copy the next.config.js from the with-docker example. tldr- I was missing output: standalone
Ended up with this. I like it because pnpm and turbo are pulled to "base", allowing me to just use bare alpine in the end result. copied from the with-docker example and updated to use pnpm.
# src Dockerfile: https://github.com/vercel/turbo/blob/main/examples/with-docker/apps/web/Dockerfile
FROM node:18-alpine AS alpine

# setup pnpm on the alpine base
FROM alpine as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN pnpm install turbo --global

FROM base AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
COPY . .
RUN turbo prune --scope=web --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

# Uncomment and use build args to enable remote caching
# ARG TURBO_TEAM
# ENV TURBO_TEAM=$TURBO_TEAM

# ARG TURBO_TOKEN
# ENV TURBO_TOKEN=$TURBO_TOKEN

RUN turbo run build --filter=web

# use alpine as the thinest image
FROM alpine AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=installer /app/apps/web/next.config.js .
COPY --from=installer /app/apps/web/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public

CMD node apps/web/server.js

This setup was much better than what I had before, thanks a lot! I went from 1.7GB to 185MB with this Dockerfile after making some small adjustments to make it fit my project! 🥳

output: "standalone" in next.config.js
**/node_modules in .dockerignore

My Dockerfile skills aren't great so this helped a lot! Thank you!

I've been trying to get it to work for the last few days with pnpm and standalone output in next.js.
The file-output with dive looks like this:

This is my Dockerfile:
# We run this file from the root directory (see docker:build:next command in package.json)

ARG APP_DIRNAME=next
ARG PROJECT=@foundation/next
ARG NODE_VERSION=20.11

# 1. Alpine image
FROM node:${NODE_VERSION}-alpine AS alpine
RUN apk update
RUN apk add --no-cache libc6-compat

# Setup pnpm and turbo on the alpine base
FROM alpine as base
RUN corepack enable
RUN npm install turbo --global
RUN pnpm config set store-dir ~/.pnpm-store

# 2. Prune projects
FROM base AS pruner
ARG PROJECT

WORKDIR /app
COPY . .
RUN turbo prune --scope=${PROJECT} --docker

# 3. Build the project
FROM base AS builder
ARG PROJECT

WORKDIR /app

# Copy lockfile and package.json's of isolated subworkspace
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=pruner /app/out/json/ .

# First install the dependencies (as they change less often)
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfile

# Copy source code of isolated subworkspace
COPY --from=pruner /app/out/full/ .

RUN turbo build --filter=${PROJECT}
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm prune --prod --no-optional
RUN rm -rf ./**/*/src

# 4. Final image - runner stage to run the application
FROM alpine AS runner
ARG APP_DIRNAME
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 next
USER next

WORKDIR /app

COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/next.config.mjs .
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/.next/standalone ./
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/.next/static ./.next/static
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/public ./public

CMD ["node", "server.js"]

When trying to run the container i'm getting:
2024-05-27 15:37:27 node:internal/modules/cjs/loader:1145
2024-05-27 15:37:27   const err = new Error(message);
2024-05-27 15:37:27               ^
2024-05-27 15:37:27
2024-05-27 15:37:27 Error: Cannot find module 'next'
2024-05-27 15:37:27 Require stack:
2024-05-27 15:37:27 - /app/server.js
2024-05-27 15:37:27     at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
2024-05-27 15:37:27     at Module._load (node:internal/modules/cjs/loader:986:27)
2024-05-27 15:37:27     at Module.require (node:internal/modules/cjs/loader:1233:19)
2024-05-27 15:37:27     at require (node:internal/modules/helpers:179:18)
2024-05-27 15:37:27     at file:///app/server.js:22:1
2024-05-27 15:37:27     at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
2024-05-27 15:37:27     at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
2024-05-27 15:37:27     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5) {
2024-05-27 15:37:27   code: 'MODULE_NOT_FOUND',
2024-05-27 15:37:27   requireStack: [ '/app/server.js' ]
2024-05-27 15:37:27 }
2024-05-27 15:37:27
2024-05-27 15:37:27 Node.js v20.13.1

I run the build with turbo from root like so:
(I have a remix application in this monorepo that has a very similar structure and runs perfectly like this from root)
// from root package.json
"docker:build:next": "turbo docker:build --filter=@foundation/next"

// in next-app package.json
"docker:build": "cd ../.. && docker build -t foundation/next -f apps/next/Dockerfile ."

If anyone has any idea to share how to solve this it's greatly appreciated! <3

@joakim-roos it looks like you are missing some dependencies and therefore, I guess you would have some issues when running you pnpm install.
The way I debug this is to add --no-cache and --progress=plain  to your docker build command. This will log every output of your multi staged build. From there you should see if pnpm install runs as expected.

Thanks @edouardr!
I did find the issue. The problem was that I totally forgot to copy over the node_modules dependencies so I added an extra layer which installs these and then copy over them to the final build. Here's a working version:
# We run this file from the root directory (see docker:build:next command in package.json)

ARG APP_DIRNAME=next
ARG PROJECT=@foundation/next
ARG NODE_VERSION=20.11

# 1. Alpine image
FROM node:${NODE_VERSION}-alpine AS alpine
RUN apk update
RUN apk add --no-cache libc6-compat

# Setup pnpm and turbo on the alpine base
FROM alpine as base
RUN corepack enable
RUN npm install turbo --global
RUN pnpm config set store-dir ~/.pnpm-store

# 2. Prune projects
FROM base AS pruner
ARG PROJECT

WORKDIR /app
COPY . .
RUN turbo prune --scope=${PROJECT} --docker

# 3. Build the project
FROM base AS builder
ARG PROJECT

WORKDIR /app

# Copy lockfile and package.json's of isolated subworkspace
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=pruner /app/out/json/ .

# First install the dependencies (as they change less often)
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfile

# Copy source code of isolated subworkspace
COPY --from=pruner /app/out/full/ .

RUN turbo build --filter=${PROJECT}
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm prune --prod --no-optional
RUN rm -rf ./**/*/src

# 4. Production dependencies
FROM builder AS dependencies
WORKDIR /app
RUN pnpm --filter=$PROJECT deploy --prod --ignore-scripts --no-optional /dependencies

# 5. Final image - runner stage to run the application
FROM alpine AS runner
ARG APP_DIRNAME
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 next
USER next

WORKDIR /app

ENV NODE_ENV production

COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/next.config.mjs .
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/.next/standalone ./
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/.next/static ./.next/static
COPY --from=dependencies --chown=remix:nodejs /dependencies/node_modules ./node_modules
COPY --from=builder --chown=next:nodejs /app/apps/${APP_DIRNAME}/public ./public

CMD ["node", "/app/server.js"]

This setup was much better than what I had before, thanks a lot! I went from 1.7GB to 185MB with this Dockerfile after making some small adjustments to make it fit my project! 🥳

Hello, could anyone help me? I am having this problem in the running RUN turbo run build --filter=web
my dockerfile:
# src Dockerfile: https://github.com/vercel/turbo/blob/main/examples/with-docker/apps/web/Dockerfile
FROM node:18-alpine AS alpine

# setup pnpm on the alpine base
FROM alpine as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN pnpm install turbo --global

FROM base AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
COPY . .
RUN turbo prune --scope=web --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

# Uncomment and use build args to enable remote caching
# ARG TURBO_TEAM
# ENV TURBO_TEAM=$TURBO_TEAM

# ARG TURBO_TOKEN
# ENV TURBO_TOKEN=$TURBO_TOKEN

RUN turbo run build --filter=web

# use alpine as the thinest image
FROM alpine AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=installer /app/apps/web/next.config.js .
COPY --from=installer /app/apps/web/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public

CMD node apps/web/server.js

so 90% of all the examples use pnpm. this happens to be the one example where an example of pnpm would add most value on account of the 30+ comments and plethora of solutions/ongoing issues now present. Any chance of this happening anytime soon?

Had same problem on COPY --from=builder /app/out/full/ . line as everyone else using pnpm.
Added **/node_modules to root .dockerignore to resolve.
Then ran into issues with the last 3 COPY lines. Needed to also copy the next.config.js from the with-docker example. tldr- I was missing output: standalone
Ended up with this. I like it because pnpm and turbo are pulled to "base", allowing me to just use bare alpine in the end result. copied from the with-docker example and updated to use pnpm.
# src Dockerfile: https://github.com/vercel/turbo/blob/main/examples/with-docker/apps/web/Dockerfile
FROM node:18-alpine AS alpine

# setup pnpm on the alpine base
FROM alpine as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN pnpm install turbo --global

FROM base AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
COPY . .
RUN turbo prune --scope=web --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
RUN pnpm install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

# Uncomment and use build args to enable remote caching
# ARG TURBO_TEAM
# ENV TURBO_TEAM=$TURBO_TEAM

# ARG TURBO_TOKEN
# ENV TURBO_TOKEN=$TURBO_TOKEN

RUN turbo run build --filter=web

# use alpine as the thinest image
FROM alpine AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

COPY --from=installer /app/apps/web/next.config.js .
COPY --from=installer /app/apps/web/package.json .

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public

CMD node apps/web/server.js

Using this with their with-docker example results in a ~650MB image as compared to the ~270MB one that is generated with their Dockerfile.

For those who need it, I've created a workaround with nextjs and create-t3-turbo.
You can find it on GitHub:
https://github.com/Security2431/create-t3-turbo-with-prisma/blob/main/apps/nextjs/Dockerfile
Feel free to modify it as needed to suit your own use case:
ARG NODE_VERSION=20
ARG APP_DIRNAME=nextjs
ARG PROJECT=@acme/nextjs

# 1. Alpine image
FROM node:${NODE_VERSION}-alpine AS alpine
RUN apk update
RUN apk add --no-cache libc6-compat

# Setup pnpm and turbo on the alpine base
FROM alpine AS base
RUN corepack enable
# Replace <your-major-version> with the major version installed in your repository. For example:
# RUN npm install turbo@2.1.3 --global
RUN npm install turbo --global

RUN pnpm config set store-dir ~/.pnpm-store

# 2. Prune projects
FROM base AS pruner
# https://stackoverflow.com/questions/49681984/how-to-get-version-value-of-package-json-inside-of-dockerfile
# RUN export VERSION=$(npm run version)

ARG PROJECT

# Set working directory
WORKDIR /app

# It might be the path to <ROOT> turborepo
COPY . .

# Generate a partial monorepo with a pruned lockfile for a target workspace.
# Assuming "@acme/nextjs" is the name entered in the project's package.json: { name: "@acme/nextjs" }
RUN turbo prune --scope=${PROJECT} --docker

# 3. Build the project
FROM base AS builder
ARG PROJECT

# Environment to skip .env validation on build
ENV CI=true

WORKDIR /app

# Copy lockfile and package.json's of isolated subworkspace
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=pruner /app/out/json/ .

# First install the dependencies (as they change less often)
RUN --mount=type=cache,id=pnpm,target=~/.pnpm-store pnpm install --frozen-lockfile

# Copy source code of isolated subworkspace
COPY --from=pruner /app/out/full/ .

RUN pnpm build --filter=${PROJECT}

# 4. Final image - runner stage to run the application
FROM base AS runner
ARG APP_DIRNAME

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs

WORKDIR /app

ENV NODE_ENV=production

COPY --from=builder --chown=nodejs:nextjs /app .
WORKDIR /app/apps/${APP_DIRNAME}

ARG PORT=3000
ENV PORT=${PORT}
EXPOSE ${PORT}

CMD ["pnpm", "start"]

For anyone using the example above, the COPY command is incorrect. It should be:
COPY --from=builder --chown=nextjs:nodejs /app .

The correct format is always --chown=user:group.

authors: EddyVinck Pedro-phd Security2431 VladSturm abetoots akutruff amosbastian anthonyshew arkmech binaryartifex edouardr ezhil56x f312213213 jeanhdev joakim-roos josefaidt jvzaniolo leetmachine mehulkar murshudov murshudov-dlx nicu-chiciuc pmm26 tadeumaia

repo: vercel/turbo