Unsupported config option for services.networks: 'my_network'
11,582
That seems docker-compose configuration issue, use below docker-compose
file, it will create a network and then you can use the same network in the docker-compose file.
version: '3.5'
services:
webapp1:
image: nginx:latest
container_name: my_container
ports:
- "8080:80"
networks:
- my_network
networks:
my_network:
driver: bridge
Also Nginx port should be 80
inside the container if you did not modify the default configuration.
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on June 16, 2022Comments
-
Admin about 2 years
I am having below error while running the docker-compose file. I have created a bridge network with name my_network
Unsupported config option for services.networks: 'my_network'
docker-compose.yml
version: '3.3' services: webapp1: image: nginx:latest container_name: my_container ports: - "8080:8080" networks: - my_network volumes: - /home/ajay/nginx:/www/data