port-forward opens an SSH tunnel and maps those ports to localhost so you can reach them from your browser or local tools.
Reference
Access remote context docker service ports. For docker services running in remote contexts that do not have ports exposed on the host VM, accessing those services can be tricky. The sitectl port-forward command can help in these situations. As an example, from a local machine, accessing your stage context’s traefik dashboard and solr admin UI could be done by running this command in the terminal: sitectl port-forward8983:solr:8983
8080:traefik:8080
8161:activemq:8161
--context stage
Then, while leaving the terminal open, in your web browser you can visit
http://localhost:8983/solr to see the solr admin UI
http://localhost:8080/dashboard to see the traefik dashboard (assuming it’s enabled in your config)
http://localhost:8161/admin/queues.jsp to see ActiveMQ queues
Be sure to run Ctrl+c in your terminal when you are done to close the connection.
How it works
sitectl opens an SSH connection to the remote context’s host and forwards eachLOCAL-PORT:SERVICE:REMOTE-PORT mapping through that tunnel. The tunnel stays open until you press Ctrl+C.
Services are identified by their service name — sitectl resolves the container and port automatically.
