multi line docker run command on windows multi line docker run command on windows docker docker

multi line docker run command on windows


In the command prompt on windows I was able to run multi line docker run commands as shown below

docker run --name packer ^-d ekambaram/packer:1.4.0

use ^ as command separator instead of \

C:\Users\ekambaram_pasham>docker run --name packer ^More? -d ekambaram/packer:1.4.07e3599a599a7b19613f50323456d66a324c2ac558bb71eb9060bda54dfcd8f4d

For PowerShell, you will need to substitute with ` (back tick) instead of ^ or \ as below

docker run -p 80:80 -p 443:443 `           -h hostname.domain `           -e "MYSQL_ROOT_PASSWORD=password" `           -e "SOGO_WORKERS=1" `           -e "POSTMASTER_PASSWORD=(plain)password" `           -e "IREDAPD_PLUGINS=['reject_null_sender', 'reject_sender_login_mismatch', 'greylisting', 'throttle', 'amavisd_wblist', 'sql_alias_access_policy']" `           -v iredmail_mysql:/var/lib/mysql `           -v iredmail_vmail:/var/vmail `           -v iredmail_clamav:/var/lib/clamav `           --name=iredmail lejmr/iredmail:mysql-latest