How to access the VM created by docker’s HyperKit?

Update 2019-01-31, thanks to ru10’s update, now there is a better way: screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty Original Answer: After a while, I found following way to get a shell of the VM that was created by HyperKit: Run from terminal: screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty You will see an empty screen, then type enter, you will get a login prompt. … Read more

How to use the official docker elasticsearch container?

I recommend using docker-compose (which makes lot of things much easier) with following configuration. Configuration (for development) Configuration starts 3 services: elastic itself and extra utilities for development like kibana and head plugin (these could be omitted, if you don’t need them). In the same directory you will need three files: docker-compose.yml elasticsearch.yml kibana.yml With … Read more

How to increase docker-machine memory Mac

You can do this via the command line. For example, to change the machine from the default 1cpu/2048MB RAM run: docker-machine stop VBoxManage modifyvm default –cpus 2 VBoxManage modifyvm default –memory 4096 docker-machine start You can then check your settings: VBoxManage showvminfo default | grep Memory VBoxManage showvminfo default | grep CPU And for docker-machine … Read more

Is it safe to clean docker/overlay2/

Docker uses /var/lib/docker to store your images, containers, and local named volumes. Deleting this can result in data loss and possibly stop the engine from running. The overlay2 subdirectory specifically contains the various filesystem layers for images and containers. To cleanup unused containers and images, see docker system prune. There are also options to remove … Read more

Port forwarding in docker-machine?

You can still access the VBoxmanage.exe command from the VirtualBox used by docker machine: VBoxManage controlvm “boot2docker-vm” natpf1 “tcp-port27017,tcp,,27017,,27017”; Use docker-machine info to get the name of your vm. use modifyvm if the vm isn’t started yet. See a practical example in this answer. That is the current workaround, pending the possibility to pass argument … Read more

How can I use a local file on container?

Yes, you can do this. What you are describing is a bind mount. See https://docs.docker.com/storage/bind-mounts/ for documentation on the subject. For example, if I want to mount a folder from my home directory into /mnt/mydata in a container, I can do: docker run -v /Users/andy/mydata:/mnt/mydata myimage Now, /mnt/mydata inside the container will have access to … Read more