Score:0

Run Multiple Commands on Docker Container Startup on Synology NAS

eg flag

Due to the way the existing folder permissions are structured via ACL I need to assign additional groups to the user inside several Docker containers I'm running. Unfortunately the containers by default do not allow this via environment variables so I think the simplest way will be to run a few commands on container startup. I know this might be a bit hacky but I'm ok with that. Just to complicate things though, this is being done on a Synology NAS which means I don't have access to the command line that runs Docker. Fortunately the GUI exposes the command value. I haven't messed too much with Docker so I'm a bit stuck trying to figure out how to do this via the command. In Linux the command I would run to accomplish what I need is:

groupadd -g 65555 group1 && groupadd -g 65556 group2 && usermod -a -G group1,group2 && default_comnand

If anyone can help covert that into a runnable command value that would be great. Also, what is the default command when none is specified? I just put in a placeholder of default_command cause by default the command is blank in the GUI.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.