My docker configuration files look like this:
Docker-compose.yml
version: '3.5'
services:
nginx:
ports:
- 8080:8080
Docker-compose.prod.yml
version: '3.5'
services:
nginx:
ports:
- 80:80
Now when I run the command: docker-compose -f docker-compose.yml -f docker-compose.prod.yml upnginx provides two ports on the host machine: 8000and 80because it combines the properties of the ports:
version: '3.5'
services:
nginx:
ports:
- 8080:8080
- 80:80
Is there a way to override it? I want to show only the port80
source
share