linux - How can i execute commands inside containers during host provision -


i using vagrant build docker host , have shell script install required packages host , script build , run containers

vagrant file

config.vm.provision :shell, :inline => "sudo /vagrant/bootstrap.sh" 

inside run containers like

docker run -d  . .bla bla .. . 

this works fine have ssh container , run make deploy install stuff.

is there way can run make deploy within bootsrap.sh.

the 1 way make entry point every run,

i want when provision host command should run inside container , show me output vagarnt shows host

use docker exec

see doc

http://docs.docker.com/reference/commandline/exec/

for example

docker exec -it container_id make deploy

or

docker exec -it container_id bash

and

make deploy

inside container


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -