3
respostas

Erro ao executar docker run --network minha-rede -d -p 8080:3000 douglasq/alura-books:cap05

Ao executar o código abaixo apresenta erro. Não há outros conteineres exceto mongodb do exercicio. Ja testei com outras portas , o conteiner simplesmente não ingressa na minha-rede Minha versão é para windows 10 pro

docker run --network minha-rede  -d -p 8080:3000 douglasq/alura-books:cap05

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: driver failed programming external connectivity on endpoint infallible_mirzakhani (8616580c6df99ae1e90c88a4d6e43d2ac0504d106272458eb209dea989d2c3d5): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3000:tcp:172.18.0.3:3000: input/output error.

Segue os dados da minha-rede

PS C:\WINDOWS\system32> docker network inspect minha-rede
[
    {
        "Name": "minha-rede",
        "Id": "43f596b7eb6c0c9482919684ff4bbcd91ac2f4ad8a5693afa4ce7e6e6b5988b6",
        "Created": "2019-02-26T00:44:20.8909715Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "9b483e2aa331aafa18c3edc759e286f3f52a52e388704b534dc24e42dfa7f31d": {
                "Name": "meu-mongo",
                "EndpointID": "f8cdf1ddc8dfc4b78b6421acb02fc6b49252d75d0767e66ca0a79786f442d613",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
3 respostas

Oi André, tudo bem? Como você criou a rede? Eu testei aqui e funcionou, também uso Windows 10 Pro.

Detalhe, sempre que eu vejo um erro que começa com "Error response from daemon", eu sempre reinicio o Docker. As vezes dá algum problema na inicialização e esse tipo de erro aparace.

Pessoal,

Também estou com dificuldades em executar o docker-composer up do exercicio no captulo 06, de qualquer forma já registro aqui meus agradecimentos pela ajuda alguém passou por algo assim:

λ  docker-compose up
alura-docker-cap06_mongodb_1 is up-to-date
Starting alura-books-2 ... error
Starting alura-books-3 ...
Starting alura-books-1 ...

Starting alura-books-3 ... error
userland proxy: mkdir /port/tcp:0.0.0.0:32835:tcp:172.18.0.3:3000: input/output error

ERROR: for alura-books-3  Cannot start service node3: driver failed programming external connectivity on endpoint alura-books-3 (da2d769dbd2d71e84e8d5a0c197453efa70582e8d3e0a8f66abadbbcf772d0d5): Error starting Starting alura-books-1 ... error

ERROR: for alura-books-1  Cannot start service node1: driver failed programming external connectivity on endpoint alura-books-1 (9bdb1e72418d0f17faea581100c4d93553abba0ee213d911ae3b31aa989deb5b): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32847:tcp:172.18.0.5:3000: input/output error

ERROR: for node2  Cannot start service node2: driver failed programming external connectivity on endpoint alura-books-2 (ded6562f7a45bbcc3f9818d3a7c8ece702256a6656b151c96a962d68c40fcefc): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32835:tcp:172.18.0.3:3000: input/output error

ERROR: for node3  Cannot start service node3: driver failed programming external connectivity on endpoint alura-books-3 (da2d769dbd2d71e84e8d5a0c197453efa70582e8d3e0a8f66abadbbcf772d0d5): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32844:tcp:172.18.0.4:3000: input/output error

ERROR: for node1  Cannot start service node1: driver failed programming external connectivity on endpoint alura-books-1 (9bdb1e72418d0f17faea581100c4d93553abba0ee213d911ae3b31aa989deb5b): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:32847:tcp:172.18.0.5:3000: input/output error
ERROR: Encountered errors while bringing up the project.
C:\Users\ivonm\Documents\docker-works\alura-curso-docker\alura-docker-cap06

segue abaixo o arquivo docker.composer.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-books-1
    ports: 
      - "3000"
    networks: 
      - production-network
    depends_on: 
      - "mongodb"

  node2:
    build: 
      dockerfile: ./docker/alura-books.dockerfile
      context: . 
    image: douglasq/alura-books
    container_name: alura-books-2
    ports: 
      - "3000"
    networks: 
      - production-network
    depends_on: 
      - "mongodb"      

  node3:
    build: 
      dockerfile: ./docker/alura-books.dockerfile
      context: . 
    image: douglasq/alura-books
    container_name: alura-books-3
    ports: 
      - "3000"
    networks: 
      - production-network
    depends_on: 
      - "mongodb"      

networks: 
  production-network:
    driver: bridge

Oi gente, tentem limpar o docker de vocês. Removendo os containers, imagens e networks. Restatando o Docker e tentando novamente.