Docker Community Forums

Share and learn in the Docker community.

Convert Mult-Valued Env Var to Single Line (Docker Run)


(Stankmstr) #1

I have a docker command that I need to execute on one line. The issue is that this command is broken down onto multiple lines at the moment, and I can’t for the life of me figure out how to modify this value so that it is compatible with the docker run command’s --env parameter running on a single line.

Below is the snippet in question (in bold). Does anyone know how to convert this style of parameter values to a single line?

docker run -it
–name=“mycontainer”
–env="SOME_USER=[user]
name = 'mike’
password = ‘password’
" \