- Make a container that normally exits keep running as daemon:
docker run -d imageName tail -f /dev/null
- docker ps --format
- Lessons from Building a Node App in Docker
- docker-machine-driver-xhyve
- SO: using rsync to develop
- Thinking Inside the Container
- Putting Jenkins in A Docker Container
- Docker and Jenkins: Data that Persists
- Jenkins, Docker, Proxies, and Compose
- Taking Control of Your Docker Image
- Building With Jenkins Inside an Ephemeral Docker Container
- Containerized Jenkins Farm Tutorial
Build a named image from a Dockerfile
in the current directory:
docker build -t name .
Get names of orphaned docker volume containers:
docker volume ls -qf dangling=true
and remove:
docker volume rm $name
Backup stuff from inside a named volume container:
docker run --rm --volumes-from dbstore -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /dbdata
and then restore:
docker run -v /dbdata --name dbstore2 ubuntu /bin/bash
docker run --rm --volumes-from dbstore2 -v $(pwd):/backup ubuntu bash -c "cd /dbdata && tar xvf /backup/backup.tar --strip 1"
Clean images:
docker rmi `docker images -q -f "dangling=true"`
Remove all untagged images:
docker rmi `docker images | grep "\s<none>" | awk '{print $3}'`
# or
docker rmi $(docker images -q --filter "dangling=true")
Stop all
docker stop $(docker ps -a -q)
Forcefully delete last 16 images. RIP my images when I ran this a second time by accident.
docker rmi -f `docker images --format "{{.ID}}" | tail -n +1 | head -n 16`