Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: failed to solve: process "/bin/sh -c yarn install --production" did not complete successfully: exit code: 1 #432

Open
tranthomanh opened this issue Feb 21, 2024 · 0 comments

Comments

@tranthomanh
Copy link

Hello, i'm trying to use Docker in window 11 when following the getting started tutorial from this site: https://docs.docker.com/get-started/02_our_app/.
But in step 3, after using command: docker build -t getting-started, I'm getting an issue:

ERROR: failed to solve: process "/bin/sh -c yarn install --production" did not complete successfully: exit code: 1
This is full console screen:
PS D:\Docker\getting-started-app> docker build -t getting-started .
[+] Building 3.7s (12/12) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 188B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1 1.7s
=> [auth] docker/dockerfile:pull token for registry-1.docker.io 0.0s
=> CACHED docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021 0.0s
=> [internal] load metadata for docker.io/library/node:18-alpine 1.6s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/4] FROM docker.io/library/node:18-alpine@sha256:ca9f6cb0466f9638e59e0c249d335a07c867cd50c429b5c7830dda1bed584649 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 4.33kB 0.0s
=> CACHED [2/4] WORKDIR /app 0.0s
=> CACHED [3/4] COPY . . 0.0s
=> ERROR [4/4] RUN yarn install --production 0.3s

[4/4] RUN yarn install --production:
0.272 exec /bin/sh: exec format error


Dockerfile:6

4 | WORKDIR /app
5 | COPY . .
6 | >>> RUN yarn install --production
7 | CMD ["node", "src/index.js"]
8 | EXPOSE 3000

ERROR: failed to solve: process "/bin/sh -c yarn install --production" did not complete successfully: exit code: 1

Please help me solve it! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant