cheat sheet¶
Clean up of containers¶
remove all exited containers (should be run on each node):
docker rm $(docker ps -q -f status=exited)
attach bash to a running container:
sudo docker exec -i -t containername /bin/bash
Dos and donts¶
https://community.spiceworks.com/topic/1832873-a-list-of-don-ts-for-docker-containers
- Don’t store data in containers
- Don’t ship your application in two pieces
- Don’t create large images
- Don’t use a single layer image
- Don’t create images from running containers
- Don’t use only the “latest” tag
- Don’t run more than one process in a single container
- Don’t store credentials in the image. Use environment variables
- Don’t run processes as a root user
- Don’t rely on IP addresses
Updating this documentation¶
issue the following command to update this documentation:
docker run --name sphinxneeds --rm \
-e "Project=Flex4apps" \
-e "Author=Till Witt, Johannes Berg, Alex Nowak" \
-e "Version=v0.1" \
-v "$(pwd)/compose:/project/compose" \
-v "$(pwd)/docs:/project/input" \
-v "$(pwd)/output:/project/output" \
-i -t tlwt/sphinxneeds-docker
docker run --name buildTheDocs --rm \
-e "Project=Flex4apps" \
-e "Author=Till Witt, Johannes Berg, Alex Nowak" \
-e "Version=v0.1" \
-v "$(pwd)/compose:/project/compose" \
-v "$(pwd)/docs:/project/input" \
-v "$(pwd)/output:/project/output" \
-i -t sphinx_image