genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.88k stars 230 forks source link

shm-size build arg #242

Open jpic opened 5 years ago

jpic commented 5 years ago

Currently, I have a Dockerfile with a yarn command that consumes a lot of memory:

 => ERROR [6/23] RUN cd /app && yarn install --cache-folder /dev/shm/yarn --frozen-lockfile                                                                             38.0s
------
 > [6/23] RUN cd /app && yarn install --cache-folder /dev/shm/yarn --frozen-lockfile:
#11 0.751 yarn install v1.13.0
#11 0.937 [1/4] Resolving packages...
#11 1.565 [2/4] Fetching packages...
#11 5.749 error An unexpected error occurred: "https://registry.yarnpkg.com/webpack/-/webpack-4.11.0.tgz: ENOSPC: no space left on device, write".
#11 5.749 info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
#11 5.749 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#11 34.65 info There appears to be trouble with your network connection. Retrying...
------
failed to solve: executor failed running [/bin/sh -c cd /app && yarn install --cache-folder /dev/shm/yarn --frozen-lockfile]: exit code: 1

Note that for docker build, it works only when passing --shm-size=512M or something like that.

Is it possible to do the same with img ?

Thanks for this great software and maintenance

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.62. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

jpic commented 5 years ago

Maybe related: https://github.com/containers/buildah/pull/1595