0
respostas

Erro no docker-compose build

Quando executo o docker-compose build recebo o seguinte erro:

npm ERR! code EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/express failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-28T21_18_11_895Z-debug.log
ERROR: Service 'node1' failed to build: The command '/bin/sh -c npm install' returned a non-zero code: 1

segue meu docker-compose.yml:

version: '3'
services:
  nginx:
    build:
      dockerfile: ./docker/nginx.dockerfile
      context: .
    image: douglasq/nginx
    container_name: nginx
    ports:
      - "80:80"
    networks:
      - production_network
    depends_on:
      - "node1"
      - "node2"
      - "node3"
  mongodb:
    image: mongo
    networks:
      - production_network
  node1:
    build:
      dockerfile: ./docker/alura-books.dockerfile
      context: .
    image: douglasq/alura-books
    container_name: alura-bookos-1
    ports:
      - "3000"
    networks:
      - production_network
    depends_on:
      - "mongodb"
  node2:
    build:
      dockerfile: ./docker/alura-books.dockerfile
      context: .
    image: douglasq/alura-books
    container_name: alura-bookos-2
    ports:
      - "3000"
    networks:
      - production_network
    depends_on:
      - "mongodb"
  node3:
    build:
      dockerfile: ./docker/alura-books.dockerfile
      context: .
    image: douglasq/alura-books
    container_name: alura-bookos-3
    ports:
      - "3000"
    networks:
      - production_network
    depends_on:
      - "mongodb"
networks:
  production_network:
    driver: bridge

Estou usando um linux Centos 8, não possuo proxy no ambiente pois faço updates do repositorio diretamente sem setar proxy nem mesmo no SO.