moby: [Windows 2016] Cannot connect between containers using service name after second docker-compose up

Hi there

I already reported an issue in docker/compose, but they told me to report it here. https://github.com/docker/compose/issues/6303

Description of the issue

I’m not able to connect from one container to another using service name at the second attempt.

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.22.0, build f46880fe
docker-py version: 3.4.1
CPython version: 3.6.6
OpenSSL version: OpenSSL 1.0.2o  27 Mar 2018

Output of docker version

Client:
 Version:      18.03.1-ee-2
 API version:  1.37
 Go version:   go1.10.2
 Git commit:   ebbcd7e
 Built:        Tue Jul 10 21:32
 OS/Arch:      windows/amd64
 Experimental: false

Server:
 Engine:
  Version:      18.03.1-ee-2
  API version:  1.37 (minimum v
  Go version:   go1.10.2
  Git commit:   ebbcd7e
  Built:        Tue Jul 10 21:4
  OS/Arch:      windows/amd64
  Experimental: false

Output of docker-compose config

networks:
  default: {}
services:
  clientapp:
    depends_on:
    - officeapp
    image: image_from_private_registry_client
    ports:
    - published: 8009
      target: 80
    volumes:
    - c:\logs\testui:C:\logs\app:rw
  database:
    image: image_from_private_registry_database
  officeapp:
    depends_on:
    - database
    image: image_from_private_registry_office
    ports:
    - published: 7010
      target: 80
    volumes:
    - c:\logs\testui:C:\logs\app:rw
version: '3.3'

Steps to reproduce the issue

  1. docker-compose up
  2. container officeapp is able to connect to database container using database alias
  3. docker-compose down
  4. docker-compose up
  5. container officeapp IS NOT ABLE to connect to database container using database alias
  6. Restart-Service docker
  7. Repeat step 1

Observed result

After second attempt of using docker-compose up containers are not able to communicate with each others using service name. (Connecting using IP works always)

Expected result

I’m expecting that network between containers should work every time in the same way and the service name should be properly resolved in network communication.

Additional information

OS version: Windows 2016

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

No, I’m waiting for server with Windows 2019. I’ll check it after my Christmas leave in January.

@cezarypiatek There is also Windows Server, version 1809 and Windows Server 2019 now 😉