0

I'm getting while trying to build my docker file

Dockerfile.dev

FROM node:alpine

WORKDIR '/app'


COPY package.json .
RUN npm install

COPY . .

CMD ["npm","run","start"]

Command Im using to build.

docker build -f Dockerfile.dev .

ERROR

ERRO[0000] Can't add file /root/frontend/1.31.1-main.sock to tar: archive/tar: sockets not supported ERRO[0000] Can't add file /root/frontend/1.31.1-shared.sock to tar: archive/tar: sockets not supported Sending build context to Docker daemon 248MB npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/react-dom 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/2019-02-25T07_39_03_442Z-debug.log
    The command '/bin/sh -c npm install' returned a non-zero code: 1
    [root@kubeboss frontend]#
  [root@kubeboss frontend]#
DevOpsGeek
  • 302
  • 1
  • 4
  • 15
  • Looks like a network issue maybe related to Alpine, see also https://stackoverflow.com/questions/40182121/error-getaddrinfo-eai-again and https://github.com/nodejs/node/issues/15780 – Henry Feb 25 '19 at 06:35
  • @Henry I tried that fix but still im facing the same issue. – DevOpsGeek Feb 25 '19 at 06:40
  • @MostafaHussein Thanks a lot given link fixed my issue. – DevOpsGeek Feb 25 '19 at 08:30
  • Below changes made to fix the issue `cat /lib/systemd/system/docker.service | grep dns ExecStart=/usr/bin/dockerd --dns 172.18.20.11 --dns 172.20.100.15 --dns 8.8.8.8 --dns 8.8.4.4 -H fd://` – DevOpsGeek Feb 25 '19 at 08:30

0 Answers0