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

docker build fails by npm ci #56

Open
ulftietze opened this issue Apr 23, 2024 · 0 comments
Open

docker build fails by npm ci #56

ulftietze opened this issue Apr 23, 2024 · 0 comments

Comments

@ulftietze
Copy link

When trying to build this docker container, the build process throws an error during the installation (build) of this Dockerfile.

Environment:

  • Ubuntu Server 20.04 LTS
  • Docker version 26.0.2, build 3c863ff
  • All updates installed, also fresh install of the server

Reproducable:

git clone [email protected]:mozilla/dialog.git
BUILDKIT_PROGRESS=plain docker build .

The variable BUILDKIT_PROGRESS is only to track the issue and generate the following output.

Output:

...
#16 [build 7/8] RUN npm ci
#16 14.20 npm notice 
#16 14.20 npm notice New patch version of npm available! 10.5.0 -> 10.5.2
#16 14.20 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.2>
#16 14.20 npm notice Run `npm install -g [email protected]` to update!
#16 14.20 npm notice 
#16 14.20 npm ERR! code 1
#16 14.20 npm ERR! path /app/node_modules/mediasoup
#16 14.20 npm ERR! command failed
#16 14.20 npm ERR! command sh -c node npm-scripts.js postinstall
#16 14.20 npm ERR! npm-scripts.js [INFO] running task "postinstall"
#16 14.20 npm ERR! npm-scripts.js [INFO] buildWorker()
#16 14.20 npm ERR! npm-scripts.js [INFO] executeCmd(): make -C worker
#16 14.20 npm ERR! make: Entering directory '/app/node_modules/mediasoup/worker'
#16 14.20 npm ERR! # Updated pip and setuptools are needed for meson.
#16 14.20 npm ERR! # `--system` is not present everywhere and is only needed as workaround for
#16 14.20 npm ERR! # Debian-specific issue (copied from https://github.com/gluster/gstatus/pull/33),
#16 14.20 npm ERR! # fallback to command without `--system` if the first one fails.
#16 14.20 npm ERR! /usr/bin/python3 -m pip install --system --target=/app/node_modules/mediasoup/worker/out/pip pip setuptools || \
#16 14.20 npm ERR! 	/usr/bin/python3 -m pip install --target=/app/node_modules/mediasoup/worker/out/pip pip setuptools || \
#16 14.20 npm ERR! 	echo "Installation failed, likely because PIP is unavailable, if you are on Debian/Ubuntu or derivative please install the python3-pip package"
#16 14.20 npm ERR! Collecting pip
#16 14.20 npm ERR!   Downloading pip-24.0-py3-none-any.whl (2.1 MB)
#16 14.20 npm ERR!      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 19.7 MB/s eta 0:00:00
#16 14.20 npm ERR! Collecting setuptools
#16 14.20 npm ERR!   Downloading setuptools-69.5.1-py3-none-any.whl (894 kB)
#16 14.20 npm ERR!      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 894.6/894.6 kB 40.8 MB/s eta 0:00:00
#16 14.20 npm ERR! Installing collected packages: setuptools, pip
#16 14.20 npm ERR! Successfully installed pip-24.0 setuptools-69.5.1
#16 14.20 npm ERR! # Install `meson` and `ninja` using `pip` into custom location, so we don't
#16 14.20 npm ERR! # depend on system-wide installation.
#16 14.20 npm ERR! /usr/bin/python3 -m pip install --upgrade --target=/app/node_modules/mediasoup/worker/out/pip  meson==0.61.5 ninja==1.10.2.4
#16 14.20 npm ERR! Collecting meson==0.61.5
#16 14.20 npm ERR!   Downloading meson-0.61.5-py3-none-any.whl.metadata (1.6 kB)
#16 14.20 npm ERR! Collecting ninja==1.10.2.4
#16 14.20 npm ERR!   Downloading ninja-1.10.2.4-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (5.3 kB)
#16 14.20 npm ERR! Downloading meson-0.61.5-py3-none-any.whl (862 kB)
#16 14.20 npm ERR!    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 862.5/862.5 kB 15.8 MB/s eta 0:00:00
#16 14.20 npm ERR! Downloading ninja-1.10.2.4-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (120 kB)
#16 14.20 npm ERR!    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.7/120.7 kB 14.3 MB/s eta 0:00:00
#16 14.20 npm ERR! Installing collected packages: ninja, meson
#16 14.20 npm ERR! Successfully installed meson-0.61.5 ninja-1.10.2.4
#16 14.20 npm ERR! /app/node_modules/mediasoup/worker/out/pip/bin/meson setup \
#16 14.20 npm ERR! 	--prefix /app/node_modules/mediasoup/worker/out/Release \
#16 14.20 npm ERR! 	--bindir '' \
#16 14.20 npm ERR! 	--libdir '' \
#16 14.20 npm ERR! 	--buildtype release \
#16 14.20 npm ERR! 	-Db_ndebug=true \
#16 14.20 npm ERR! 	-Db_pie=true \
#16 14.20 npm ERR! 	-Db_staticpic=true \
#16 14.20 npm ERR! 	--reconfigure \
#16 14.20 npm ERR! 	"" \
#16 14.20 npm ERR! 	/app/node_modules/mediasoup/worker/out/Release/build || \
#16 14.20 npm ERR! 	/app/node_modules/mediasoup/worker/out/pip/bin/meson setup \
#16 14.20 npm ERR! 		--prefix /app/node_modules/mediasoup/worker/out/Release \
#16 14.20 npm ERR! 		--bindir '' \
#16 14.20 npm ERR! 		--libdir '' \
#16 14.20 npm ERR! 		--buildtype release \
#16 14.20 npm ERR! 		-Db_ndebug=true \
#16 14.20 npm ERR! 		-Db_pie=true \
#16 14.20 npm ERR! 		-Db_staticpic=true \
#16 14.20 npm ERR! 		"" \
#16 14.20 npm ERR! 		/app/node_modules/mediasoup/worker/out/Release/build
#16 14.20 npm ERR! The Meson build system
#16 14.20 npm ERR! Version: 0.61.5
#16 14.20 npm ERR! Source dir: /app/node_modules/mediasoup/worker
#16 14.20 npm ERR! Build dir: /app/node_modules/mediasoup/worker/out/Release/build
#16 14.20 npm ERR! Build type: native build
#16 14.20 npm ERR! Project name: mediasoup-worker
#16 14.20 npm ERR! Project version: undefined
#16 14.20 npm ERR! C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0")
#16 14.20 npm ERR! C linker for the host machine: cc ld.bfd 2.40
#16 14.20 npm ERR! C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (Debian 12.2.0-14) 12.2.0")
#16 14.20 npm ERR! C++ linker for the host machine: c++ ld.bfd 2.40
#16 14.20 npm ERR! Host machine cpu family: x86_64
#16 14.20 npm ERR! Host machine cpu: x86_64
#16 14.20 npm ERR! Downloading openssl source from https://www.openssl.org/source/openssl-3.0.7.tar.gz
#16 14.20 npm ERR! HTTP Error 403: Forbidden
#16 14.20 npm ERR! A fallback URL could be specified using source_fallback_url key in the wrap file
#16 14.20 npm ERR! 
#16 14.20 npm ERR! meson.build:164:0: ERROR: could not get https://www.openssl.org/source/openssl-3.0.7.tar.gz is the internet available?
#16 14.20 npm ERR! 
#16 14.20 npm ERR! A full log can be found at /app/node_modules/mediasoup/worker/out/Release/build/meson-logs/meson-log.txt
#16 14.20 npm ERR! make: Leaving directory '/app/node_modules/mediasoup/worker'
#16 14.20 npm ERR! Usage:   
#16 14.20 npm ERR!   /usr/bin/python3 -m pip install [options] <requirement specifier> [package-index-options] ...
#16 14.20 npm ERR!   /usr/bin/python3 -m pip install [options] -r <requirements file> [package-index-options] ...
#16 14.20 npm ERR!   /usr/bin/python3 -m pip install [options] [-e] <vcs project url> ...
#16 14.20 npm ERR!   /usr/bin/python3 -m pip install [options] [-e] <local project path> ...
#16 14.20 npm ERR!   /usr/bin/python3 -m pip install [options] <archive url/path> ...
#16 14.20 npm ERR! 
#16 14.20 npm ERR! no such option: --system
#16 14.20 npm ERR! WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 14.20 npm ERR! WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 14.20 npm ERR! Directory does not contain a valid build tree:
#16 14.20 npm ERR! /app/node_modules/mediasoup/worker/out/Release/build
#16 14.20 npm ERR! make: *** [Makefile:110: setup] Error 1
#16 14.20 npm ERR! npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C worker
#16 14.20 
#16 14.20 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-23T19_57_18_083Z-debug-0.log
#16 ERROR: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1
------
 > [build 7/8] RUN npm ci:
14.20 npm ERR! 
14.20 npm ERR! no such option: --system
14.20 npm ERR! WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
14.20 npm ERR! WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
14.20 npm ERR! Directory does not contain a valid build tree:
14.20 npm ERR! /app/node_modules/mediasoup/worker/out/Release/build
14.20 npm ERR! make: *** [Makefile:110: setup] Error 1
14.20 npm ERR! npm-scripts.js [ERROR] executeCmd() failed, exiting: Error: Command failed: make -C worker
14.20 
14.20 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-23T19_57_18_083Z-debug-0.log
------
Dockerfile:10
--------------------
   8 |     copy package.json .
   9 |     copy package-lock.json .
  10 | >>> run npm ci
  11 |     copy . .
  12 |     from node:lts-slim
--------------------
ERROR: failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1
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