Skip to content
doronshai edited this page Feb 16, 2017 · 2 revisions

open bash terminal on container:

sudo docker run --rm -v /Users/doronshai/code/repo:/mnt/xxx -w /mnt/xxx -it test/ubuntu16 /bin/bash

run command on container with passing env variables:

sudo docker run --rm -w /mnt/xxx -e PATH=/xxx/xxx/xxx -v /tmp/.npm/rhel7:/root/.npm -v /Users/doronshai/code/repo:/mnt/xxx test/ubuntu16 ./command.sh
rm - will delete container once stopped 
v  - mount from host to a folder in the container