Docker Swarm Cheat Sheet/Publish a new port

Add a published port to an existing service.

Section: Swarm Services

Publish a new port

bash
bash
docker service update --publish-add 8443:443 web
Explanation

Useful for incremental service exposure changes.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Swarm Services
Create a service
Create a replicated or global service in the swarm.
OpenIn sheetbashsame section
List services
List swarm services.
OpenIn sheetbashsame section
List service tasks
List the tasks for a service.
OpenIn sheetbashsame section
Inspect a service
Show low-level service details.
OpenIn sheetbashsame section
Scale a service
Scale a service to the desired replica count.
OpenIn sheetbashsame section
Update service image
Roll out a new image for a service.
OpenIn sheetbashsame section