command line arguments to docker run command line arguments to docker run docker docker

command line arguments to docker run


use the -c option to bash to give it a command line as a string:

sudo docker run -i -t crystal/mono-base bash -c "/usr/local/bin/mono /home/crystal/Downloads/BackgroundProcesser.exe & /bin/bash"

and put something after the backgrounded command to the container doesn't immediately exit


@Ulfeldt's answer works. You may want to create a script to manage your processes, as this kind of commandline will quickly get out of hand. You can also use supervisor to run multiple processes, as has been explained elsewhere.