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