Step: "Building the App's Container Image" fails
See original GitHub issueI’m working on my new 2021 Macbook 16" pro with an M1 pro processor and close to no experience with docker whatsoever.
While working through the tutorial I ran into problems on the step described below:
I installed the Docker Desktop successfully and this works fine. The docker101 tutorial works as expected. Now after creating the Dockerfile and running the docker build -t getting-started .
command I get the following error:
------
> [5/5] RUN yarn install --production:
#9 0.351 yarn install v1.22.15
#9 0.407 [1/4] Resolving packages...
#9 0.580 warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^2.0.0"
#9 0.581 warning Resolution field "ansi-regex@5.0.1" is incompatible with requested version "ansi-regex@^3.0.0"
#9 0.809 warning sqlite3 > node-gyp > tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
#9 0.822 warning sqlite3 > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
#9 0.904 warning sqlite3 > node-gyp > request > har-validator@5.1.5: this library is no longer supported
#9 0.995 warning sqlite3 > node-gyp > request > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
#9 1.962 [2/4] Fetching packages...
#9 9.459 info fsevents@2.3.2: The platform "linux" is incompatible with this module.
#9 9.459 info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
#9 9.465 [3/4] Linking dependencies...
#9 9.981 [4/4] Building fresh packages...
#9 10.81 error /app/node_modules/sqlite3: Command failed.
#9 10.81 Exit code: 1
#9 10.81 Command: node-pre-gyp install --fallback-to-build
#9 10.81 Arguments:
#9 10.81 Directory: /app/node_modules/sqlite3
#9 10.81 Output:
#9 10.81 node-pre-gyp info it worked if it ends with ok
#9 10.81 node-pre-gyp info using node-pre-gyp@0.11.0
#9 10.81 node-pre-gyp info using node@12.22.7 | linux | arm64
#9 10.81 node-pre-gyp WARN Using request for node-pre-gyp https download
#9 10.81 node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node" (not found)
#9 10.81 node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
#9 10.81 node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
#9 10.81 node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
#9 10.81 node-pre-gyp WARN Pre-built binaries not found for sqlite3@5.0.2 and node@12.22.7 (node-v72 ABI, musl) (falling back to source compile with node-gyp)
#9 10.81 node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
#9 10.81 gyp info it worked if it ends with ok
#9 10.81 gyp info using node-gyp@3.8.0
#9 10.81 gyp info using node@12.22.7 | linux | arm64
#9 10.81 gyp info ok
#9 10.81 gyp info it worked if it ends with ok
#9 10.81 gyp info using node-gyp@3.8.0
#9 10.81 gyp info using node@12.22.7 | linux | arm64
#9 10.81 gyp ERR! configure error
#9 10.81 gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
#9 10.81 gyp ERR! stack at PythonFinder.failNoPython (/app/node_modules/node-gyp/lib/configure.js:484:19)
#9 10.81 gyp ERR! stack at PythonFinder.<anonymous> (/app/node_modules/node-gyp/lib/configure.js:406:16)
#9 10.81 gyp ERR! stack at F (/app/node_modules/which/which.js:68:16)
#9 10.81 gyp ERR! stack at E (/app/node_modules/which/which.js:80:29)
#9 10.81 gyp ERR! stack at /app/node_modules/which/which.js:89:16
#9 10.81 gyp ERR! stack at /app/node_modules/isexe/index.js:42:5
#9 10.81 gyp ERR! stack at /app/node_modules/isexe/mode.js:8:5
#9 10.81 gyp ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
#9 10.81 gyp ERR! System Linux 5.10.47-linuxkit
#9 10.81 gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
#9 10.81 gyp ERR! cwd /app/node_modules/sqlite3
#9 10.81 gyp ERR! node -v v12.22.7
#9 10.81 gyp ERR! node-gyp -v v3.8.0
#9 10.81 gyp ERR! not ok
#9 10.81 node-pre-gyp ERR! build error
#9 10.81 node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
#9 10.81 node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
#9 10.81 node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
#9 10.81 node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1022:16)
#9 10.81 node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
#9 10.81 node-pre-gyp ERR! System Linux 5.10.47-linuxkit
#9 10.81 node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#9 10.81 node-pre-gyp ERR! cwd /app/node_modules/sqlite3
#9 10.81 node-pre-gyp ERR! node -v v12.22.7
#9 10.81 node-pre-gyp ERR! node-pre-gyp -v v0.11.0
#9 10.81 node-pre-gyp ERR! not ok
#9 10.81 Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
#9 10.81 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
executor failed running [/bin/sh -c yarn install --production]: exit code: 1
Expecting that the tutorial will mostly be followed by people with little or no experience with docker you’d expect this to work of the box.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:9
Top Results From Across the Web
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >Docker fails on build for any command inside container
I've installed Docker on Windows Server 2019 according to this manual but when I try to build my image it fails with errors:...
Read more >How to Debug and Fix Common Docker Issues - DigitalOcean
In this troubleshooting guide aimed at people new to Docker, you'll troubleshoot problems when building Docker images, resolve naming collisions ...
Read more >Building your Docker Image - Runnable
The next step after dockerizing your Rails application is to build your image. This process might surface some errors. We'll take a closer...
Read more >Building a Native Executable - Quarkus
If you cannot install GraalVM, you can use a multi-stage Docker build to run ... the native image to start before automatically failing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bcromijn Try to change the third line of Dockerfile from
To
Worked for me on my MacBook with M1.
It worked for me as well but ran into some other issues further on in the tutorial. Which I describe here: #222 .
The tutorial is not up to date for the newest M1 Macbooks.