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 many CPUs does a docker container use?

As Charles mentions, by default all can be used, or you can limit it per container using the –cpuset-cpus parameter. docker run –cpuset-cpus=”0-2″ myapp:latest That would restrict the container to 3 CPU’s (0, 1, and 2). See the docker run docs for more details. The preferred way to limit CPU usage of containers is with … Read more

docker – how do you disable auto-restart on a container?

You can use the –restart=unless-stopped option, as @Shibashis mentioned, or update the restart policy (this requires docker 1.11 or newer); See the documentation for docker update and Docker restart policies. docker update –restart=no my-container that updates the restart-policy for an existing container (my-container)

How to list containers in Docker

To show only running containers use the given command: docker ps To show all containers use the given command: docker ps -a To show the latest created container (includes all states) use the given command: docker ps -l To show n last created containers (includes all states) use the given command: docker ps -n=-1 To … Read more

Multiple Docker containers and Celery

First, let clarify the difference between celery library (which you get with pip install or in your setup.py) and celery worker – which is the actual process that dequeue tasks from the broker and handle them. Of course you might wanna have multiple workers/processes (for separating different task to a different worker – for example). … Read more