docker-web-gui
docker-web-gui copied to clipboard
Docker build failed because of old npm version
Hey there!
Thanks for sharing this project. I've no ideo about using npm but docker-compose up -d
gives me that:
$ docker-compose up -d
Creating network "docker-web-gui_default" with the default driver
Building docker-web-gui
Sending build context to Docker daemon 5.435MB
Step 1/8 : FROM node:alpine
alpine: Pulling from library/node
9b18e9b68314: Pull complete
b2d14f5506e1: Pull complete
7939360db5ad: Pull complete
445895a5e7bc: Pull complete
Digest: sha256:717a3d788a41347ceb43c1f65831538d75ea74a4d29dfefadb7b7246d450127c
Status: Downloaded newer image for node:alpine
---> c95681c67390
Step 2/8 : WORKDIR /src
---> Running in 969027808e25
Removing intermediate container 969027808e25
---> cd1fa3d5edfe
Step 3/8 : ADD ./backend /src/backend
---> e46105c0ddd6
Step 4/8 : ADD ./client /src/client
---> 4c6068e4bf3e
Step 5/8 : ADD ./app.js /src/app.js
---> 2a3a147ca464
Step 6/8 : RUN cd /src/backend && npm install --silent
---> Running in 1fa82e6f293d
npm notice
npm notice New minor version of npm available! 8.18.0 -> 8.19.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.1>
npm notice Run `npm install -g [email protected]` to update!
npm notice
The command '/bin/sh -c cd /src/backend && npm install --silent' returned a non-zero code: 1
ERROR: Service 'docker-web-gui' failed to build : Build failed
May you fix this please? 😄
Had this issue too, looks like python3 and build-base is needed, Just needed to add
RUN apk add --no-cache python3 py3-pip build-base
to the Dockerfile to make it like
FROM node:alpine
WORKDIR /src
RUN apk add --no-cache python3 py3-pip build-base
ADD ./backend /src/backend
ADD ./client /src/client
ADD ./app.js /src/app.js
RUN cd /src/backend && npm install
CMD ["node", "/src/app.js"]
EXPOSE 3230
@rakibtg Is this repo dead?
Btw! Checkout this branch fix/docker-runtime-bug
and lmk if this fixes the issue.
Hi all! This has been fixed along with the permission issues. Please pull latest changes from master
. Then use docker-compose build
and docker-compose up
to run the application.
If you are still facing this issue please re-open it.