Please help me solve this problem
I’m newbie and try to learning Docker and K8s
I try many other version of node:20.14.0-alpine3.20, alpine, 3.20,…… But all of this fail
So please help me solve it with basic way.
Thank you very much.
=====================================================================================
C:Userspvdatsimpleweb_philip>docker build .
[+] Building 0.0s (0/0) docker:default
[+] Building 5.7s (5/5) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.2s
=> => transferring dockerfile: 128B 0.1s
=> [internal] load .dockerignore 0.2s
=> => transferring context: 2B 0.1s
=> [internal] load metadata for docker.io/library/node:20.14.0-alpine3.20 1.2s
=> CACHED [1/2] FROM docker.io/library/node:20.14.0-alpine3.20@sha256:66c7d989b6dabba6b4305b88f40912679aebd9f387a5b16ffa76dfb9ae90b060 0.0s
=> ERROR [2/2] RUN npm install 4.2s
[2/2] RUN npm install:
4.088 npm error Tracker “idealTree” already exists
4.107
4.108 npm error A complete log of this run can be found in: /root/.npm/_logs/2024-06-08T10_48_36_021Z-debug-0.log
Dockerfile:4
2 | FROM node:20.14.0-alpine3.20
3 |
4 | >>> RUN npm install
5 |
6 | CMD [“npm”,”start”]
ERROR: failed to solve: process “/bin/sh -c npm install” did not complete successfully: exit code: 1
C:Userspvdatsimpleweb_philip>
I tried to change lots of other version such as
FROM node:20.14.0-alpine3.20
FROM node:20.14.0-alpine
FROM node:20-alpine3.20
.
.
.
But all of this fail.
And I expect that npm install can install successfully.
Philip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.