Docker-Machine

Some basics to start with docker machine.

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 $("docker-machine.exe" env default)

#run the first container
docker run ubuntu echo hello world
docker run -d -p 8000:80 httpd:2.4
curl $(docker-machine ip default):8000
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



104 -1 = 
  • en/dev/env/docker-machine.txt
  • Last modified: 2020/03/05 21:23
  • (external edit)