Docker port change not working

I’m not sure I’m doing this right but seems like once I compose the docker image its working fine for port 80 as in the example

but if I change ports in the docker-compose.yml file to
- target: 8080
published: 8080
and run
docker-compose up -d I get ERR_CONNECTION_REFUSED with IP:8080
do I need to change this somewhere else on config?
I can see the port changed in Portainer

anyone able to help ?

You need to remap the port,

this should do the trick

  • target: 80
  • published: 8080

Thnaks you so much its worked!

1 Like