no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | en:dev:env:docker-machine [2020/03/05 21:23] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Docker-Machine ====== | ||
+ | Some basics to start with docker machine. | ||
+ | <sxh bash;> | ||
+ | docker-machine ls #list all remote daemons | ||
+ | docker-machine active #show active daemon | ||
+ | #change to different VM | ||
+ | docker-machine env default | ||
+ | #connect your shell to the new machine | ||
+ | eval $(" | ||
+ | |||
+ | #run the first container | ||
+ | docker run ubuntu echo hello world | ||
+ | docker run -d -p 8000:80 httpd:2.4 | ||
+ | curl $(docker-machine ip default): | ||
+ | docker ps #get container id | ||
+ | docker stop #stop container | ||
+ | docker stop $(docker ps -a) #stop all container | ||
+ | docker-machine create -d virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 6144 --virtualbox-disk-size 15000 devdays #create a docker daemon in virtualbox | ||
+ | </ |