Dockerfile:
FROM iron/node
RUN apk add --update bash && rm -rf /var/cache/apk/*
RUN apk add --update curl && rm -rf /var/cache/apk/*
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install
CMD [ "node", "index.js" ]
码头工人构建日志:
Sending build context to Docker daemon 198.2 MB
Step 1 : FROM iron/node
---> 9ca501065d18
Step 2 : RUN apk add --update bash && rm -rf /var/cache/apk/*
---> Using cache
---> 0a03d023f33e
Step 3 : RUN apk add --update curl && rm -rf /var/cache/apk/*
---> Using cache
---> 3e0176dae102
Step 4 : WORKDIR /usr/src/app
---> Using cache
---> 3f9d925bd76c
Step 5 : COPY . /usr/src/app
---> 0c2c195505dd
Removing intermediate container de7cb9edede2
Step 6 : RUN npm install
---> Running in d7549ec2707d
Error relocating /usr/bin/node: uv_os_free_passwd: symbol not found
Error relocating /usr/bin/node: uv_os_get_passwd: symbol not found
The command '/bin/sh -c npm install' returned a non-zero code: 127
这是怎么回事?这些错误是什么意思?:
Error relocating /usr/bin/node: uv_os_free_passwd: symbol not found
Error relocating /usr/bin/node: uv_os_get_passwd: symbol not found
如何解决这个问题?