e7d/speedtest

How to Rebuild Docker Container

bkeifer opened this issue · 0 comments

What is the correct way to rebuild the docker container? I'm getting a ton of errors with:

docker build -t speedtest .

# docker build -t speedtest .
Sending build context to Docker daemon      2MB
Step 1/17 : FROM node:lts-alpine AS build
 ---> 710c8aa630d5
Step 2/17 : WORKDIR /app
 ---> Using cache
 ---> 51a81a42cee6
Step 3/17 : COPY lerna.json /app/lerna.json
 ---> Using cache
 ---> d6578c7a015d
Step 4/17 : COPY package.json /app/package.json
 ---> Using cache
 ---> 2426d7429398
Step 5/17 : COPY package-lock.json /app/package-lock.json
 ---> Using cache
 ---> 7f85d0ba0672
Step 6/17 : COPY packages /app/packages
 ---> Using cache
 ---> 8ec8279b4f5e
Step 7/17 : RUN apk add --no-cache   g++   make   python3   && npm run setup   && npm run build
 ---> Running in 58682bc340a3
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/24) Installing binutils (2.35.2-r2)
(2/24) Installing libgomp (10.3.1_git20210424-r2)
(3/24) Installing libatomic (10.3.1_git20210424-r2)
(4/24) Installing libgphobos (10.3.1_git20210424-r2)
(5/24) Installing gmp (6.2.1-r0)
(6/24) Installing isl22 (0.22-r0)
(7/24) Installing mpfr4 (4.1.0-r0)
(8/24) Installing mpc1 (1.2.1-r0)
(9/24) Installing gcc (10.3.1_git20210424-r2)
(10/24) Installing musl-dev (1.2.2-r3)
(11/24) Installing libc-dev (0.7.2-r3)
(12/24) Installing g++ (10.3.1_git20210424-r2)
(13/24) Installing make (4.3-r0)
(14/24) Installing libbz2 (1.0.8-r1)
(15/24) Installing expat (2.4.1-r0)
(16/24) Installing libffi (3.3-r2)
(17/24) Installing gdbm (1.19-r0)
(18/24) Installing xz-libs (5.2.5-r0)
(19/24) Installing mpdecimal (2.5.1-r1)
(20/24) Installing ncurses-terminfo-base (6.2_p20210612-r0)
(21/24) Installing ncurses-libs (6.2_p20210612-r0)
(22/24) Installing readline (8.1.0-r0)
(23/24) Installing sqlite-libs (3.35.5-r0)
(24/24) Installing python3 (3.9.5-r2)
Executing busybox-1.33.1-r6.trigger
OK: 237 MiB in 40 packages

> setup
> npm ci && lerna bootstrap

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated 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.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 752 packages, and audited 753 packages in 46s

27 packages are looking for funding
  run `npm fund` for details

50 vulnerabilities (19 moderate, 30 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
lerna notice cli v3.22.1
lerna info Bootstrapping 2 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in 'speedtest-web'
lerna ERR! npm install stderr:
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated uuid@3.3.3: 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.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /app/packages/web/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /app/packages/web/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/local/bin/node',
npm ERR! gyp verb cli   '/app/packages/web/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.13.1 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/app/packages/web/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/app/packages/web/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/app/packages/web/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/app/packages/web/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/app/packages/web/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/app/packages/web/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/app/packages/web/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/app/packages/web/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/app/packages/web/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed  python Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/app/packages/web/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/app/packages/web/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/app/packages/web/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /app/packages/web/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (/app/packages/web/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/app/packages/web/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack     at F (/app/packages/web/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack     at E (/app/packages/web/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack     at /app/packages/web/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack     at /app/packages/web/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /app/packages/web/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Linux 5.4.0-91-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/app/packages/web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /app/packages/web/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-12-07T01_40_17_784Z-debug.log

lerna ERR! npm install exited 1 in 'speedtest-web'
npm notice
npm notice New minor version of npm available! 8.1.2 -> 8.2.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.2.0>
npm notice Run `npm install -g npm@8.2.0` to update!
npm notice
The command '/bin/sh -c apk add --no-cache   g++   make   python3   && npm run setup   && npm run build' returned a non-zero code: 1