Start docker container with additional parameters
Usually, when I use existing docker images from docker-hub or even my own, there are plenty of options I would like to provide on start of a new container. Currently plesk does not support that. From the commandline a docker-container can be instantiated with several image-specific parameters. I would like to be able to do that from plesk , too.
The Docker extension now supports launching a Portainer container. Portainer is container management software that makes it easier to manage Docker containers. Among other things, it allows you to override "command" and "entrypoint" settings. We would love to hear your feedback on our forum at https://talk.plesk.com.
— AY
-
Alexander Yamshanov commented
Hi! Paluke,
To install Portainer, click the "Install Portainer" button in the upper right corner of the extension page (Plesk Navigation Menu / "Docker" / Install Portainer). Once it is installed, click "Go to Portainer" to open it.
For details on how to configure the advanced settings in Portainer, see https://docs.portainer.io/user/docker/containers/advanced
-
Paluke commented
Hi AY, that is great news! Is there documentation available on how to do this?
-
Ide Stoutjesdijk commented
+1
-
Atze commented
+1
-
Kevin Beckers commented
+1
-
Paluke commented
The thing I'm struggling with the most, is that all docker containers run under Root.
If I run a container for a certain domain, I want it to run under that user.Without the option of adding it to the docker run argument I have to add it to the dockerfile.
I then cannot upload my freshly crafted image in the plesk UI (which is a bug on it's own) and have to do it through SSH.
I have to do this a lot, because I don't want any public container running with root on my server. This is not secure.
tl;dr
Please add at least an option to specify a userId and usergroup:
Taken from the documentation:
USER
root (id = 0) is the default user within a container. The image developer can create additional users. Those users are accessible by name. When passing a numeric ID, the user does not have to exist in the container.
The developer can set a default user to run the first process with the Dockerfile USER instruction. When starting a container, the operator can override the USER instruction by passing the -u option.
-u="", --user="": Sets the username or UID used and optionally the groupname or GID for the specified command.
The followings examples are all valid:
--user=[ user | user:group | uid | uid:gid | user:gid | uid:group ]https://docs.docker.com/engine/reference/run/
So if there would be a input field for user / group (or dare I say a dropdown with the available users?) That would be really a good thing to have for security.
-
Lukas Obkircher commented
+1