Docker Community Forums

Share and learn in the Docker community.

On restart of docker service windows 2016 containers detached from the network


#1

Expected behavior

On restart of docker service on windows 2016 containers should be connected with custom Network. The same is Working fine with Azure and AWS VM.

Actual behavior

On restart of docker service on windows 2016 containers detached from the network and containers Ststus change to Exited. I have to reconnect all the container to network using “docker network connect” command. I have created custom nat network for my containers.

Steps to reproduce the behavior

  1. Create container with custom network.
    docker run --name TEST --network=TestNetwork --ip 192.168.17.3 -p 5000:5000 -p 5443:5443 -d --restart always REPO/Test

  2. All is working fine

  3. Stop docker Service using stop-service docker command

  4. Start docker Service using start-service docker command

  5. Run command docker container ls not container shown there.

  6. Run command docker container ls -a and container will be shown with status Exited.

Please let me know how i can resolve this issue.