Meu Dockerfile:
FROM node:latest
MAINTAINER Douglas Quintanilha
ENV PORT=3000
COPY . /var/www
WORKDIR /var/www
RUN npm install
ENTRYPOINT npm start
EXPOSE $PORT
Mensagem de erro no Docker Quickstart Terminal:
jbdj2@DESKTOP-VUKQI58 MINGW64 ~/Desktop/volume-exemplo
$ docker build -f Dockerfile -t douglasq/node .
Sending build context to Docker daemon 6.144kB
Step 1/8 : FROM node:latest
---> 52fe93b8eea7
Step 2/8 : MAINTAINER Douglas Quintanilha
---> Using cache
---> d020cd0dcaaa
Step 3/8 : ENV PORT=3000
---> Using cache
---> 7ff40046b59f
Step 4/8 : COPY . /var/www
---> Using cache
---> 9cd8f050dbcb
Step 5/8 : WORKDIR /var/www
---> Using cache
---> d140b08d45d2
Step 6/8 : RUN npm install
---> Running in fb1d15cd1c10
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/express failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-07-23T19_43_37_980Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1
O que achei estranho é que antes estava funcionando, mas quando alterei o Dockerfile para usar a variável de ambiente $PORT, deu esse erro acima.