Docker container not running

by Kyle DeGennaro   Last Updated July 11, 2019 20:01 PM

I have the following docker-compose file:

version: '3'
services:
  ubuntu:
    container_name: ubuntu
    image: ubuntu:latest
    restart: always
    volumes:
      - /home/devops/ubuntu/data:/var/lib/ubuntu
      - /home/devops/ubuntu/config:/etc/ubuntu/
    networks:
      ubuntu_network:
        ipv4_address: 172.24.0.10

networks:
  ubuntu_network:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.24.0.0/16

I then execute the command docker-compose up -d

However, then when I try to use the docker shell docker exec -it ubuntu /bin/bash I get this error message:

unable to upgrade to tcp, received 409

I think the problem has to do with my docker-compose file. I am new to Docker and have no idea what I am doing wrong. Thanks in advance to all of those who reply.

EDIT: Now I am getting this error instead:

Error response from daemon: Container e8b1ce3a8de48d14c6216d47c07e569fa157f7d1c3214e972f18f10b3132eafc is restarting, wait until the container is running


Related Questions


Updated April 04, 2017 07:01 AM

Updated March 29, 2019 12:01 PM

Updated May 01, 2019 17:01 PM

Updated May 09, 2019 19:01 PM

Updated June 14, 2017 07:01 AM