ERROR: failed to solve: process "/bin/sh -c yarn install --production" did not complete successfully: exit code: 1
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, javascript
- Domain
- devops, documentation
Research direction
Start with the Step 3 getting-started tutorial and its Dockerfile, then reproduce the docker build -t getting-started . command on the reported Windows setup. Investigate the exec format error during yarn install --production; done means the tutorial build succeeds on the supported setup or clearly documents the required prerequisite and workaround.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 6.4k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/getting-started
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
docker/getting-started#481 · 2 comments · 5 reactions ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
docker/getting-started#394 · 1 comment · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
docker/getting-started#494 ·
-
ChatOpen
Difficulty 5/5 Over a week Newbie friendliness 10/100
docker/getting-started#482 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 1/100
docker/getting-started#477 ·
All issues in docker/getting-started
Similar issues
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
amponce/archive-movie-browser#354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
saayam-for-all/webapp#1870 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Imageomics/OpenCite#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
chr15m/twiiit.com#20 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
antropos17/Aegis#629 ·
Maintainers usually reply within 4 days