Not enough entropy to support /dev/random in docker containers running in boot2docker

I just realized, that it is simple as mounting /dev/urandom from the host as /dev/random into the container: $ docker run -v /dev/urandom:/dev/random … The result is as expected: $ docker run –rm -it -v /dev/urandom:/dev/random ubuntu dd if=/dev/random of=/dev/null bs=1 count=1024 1024+0 records in 1024+0 records out 1024 bytes (1.0 kB) copied, 0.00223239 s, … 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 do I mount a Docker volume while using a Windows host?

It is possible the / is interpreted as an option by the CMD Windows shell. Try first a docker-machine ssh default, in order to open an ssh session in your VM. From there try the docker run again: docker run -v /c/Users/phisch/dev/htdocs:/var/www phisch:dev As commented by thaJeztah in issue 18290: You could consider using docker-compose; … Read more

Docker: How to clear the logs properly for a Docker container?

First the bad answer. From this question there’s a one-liner that you can run: echo “” > $(docker inspect –format=”{{.LogPath}}” <container_name_or_id>) instead of echo, there’s the simpler: : > $(docker inspect –format=”{{.LogPath}}” <container_name_or_id>) or there’s the truncate command: truncate -s 0 $(docker inspect –format=”{{.LogPath}}” <container_name_or_id>) I’m not a big fan of either of those since … Read more