How to run Solace PubSub+ with unprivileged user

arih
arih Member, Employee Posts: 125 Solace Employee
edited September 2019 in Tips and Tricks #1

If you need to run Solace PubSub+ on docker but want to use unprivileged user, please take a look at the following sample command.

docker run -d --user 1000  \
-p 80:1080 -p 443:1443 -p 943:1943 \
-p 8080:8080 -p 8443:8443 -p 8883:8883 -p 9000:9000 -p 9443:9443 \
-p 2222:2222 -p 55555:55555 -p 1883:1883 -p 8000:8000 \
--shm-size=2g \
--env username_admin_globalaccesslevel=admin --env username_admin_password=admin \
--env system_scaling_maxconnectioncount=1000 \
--env service_webtransport_port=1080 \
--env service_webtransport_tlsport=1443 \
--env service_semp_tlsport=1943 \
--name=mypubsub solace/solace-pubsub-standard

The main thing is adding the --user parameter, as well as making sure we're not using any privileged ports --which are ports below 1024. This sample shows that we're adding additional environment variables to modify three ports to use non-default port that is higher than 1024. Note also we're changing the publish argument for those new ports, but this step is optional.

Tagged: