Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| lwc:docker [2026/01/24 14:34] – John Harrison | lwc:docker [2026/03/01 10:34] (current) – John Harrison | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| * copy files from docker container: '' | * copy files from docker container: '' | ||
| * prune unneeded files (save disk space): '' | * prune unneeded files (save disk space): '' | ||
| + | |||
| + | ===== Docker Maintenance ===== | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * | ||
| + | |||
| + | ===== Housekeeping ===== | ||
| + | * When removing a service use '' | ||
| + | * The '' | ||
| + | * When updating images, after pulling and restarting, run '' | ||
| + | * '' | ||
| + | * | ||
| + | ==== Watchtower ==== | ||
| + | * Watchtower is a container which auto updates Docker containers | ||
| + | * It will only update containers with updates that have the same tag | ||
| + | * to always get the latest version use the tag '' | ||
| + | * you can check which images have which tags with '' | ||
| + | * some images might have '' | ||
| + | * check the logs: '' | ||
| + | * if you want Watchtower to skip trying to update an image add to '' | ||
| + | < | ||
| + | | ||
| + | db: | ||
| + | # label the image as each image gets its own label | ||
| + | image: mariadb: | ||
| + | labels: | ||
| + | - " | ||
| + | </ | ||
| + | * run watchtower immediately: | ||
| + | |||
| + | ===== Basic Operations ===== | ||
| + | * '' | ||
| + | * use the '' | ||
| + | * use the '' | ||
| + | * user the '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | ===== Docker Registry ===== | ||
| + | * Docker Hub is the default registry and it is the biggest public registry | ||
| + | * you can store a private or public registry on Docker Hub | ||
| + | * Each application gets its on repo in the registry | ||
| + | |||
| + | ===== creating a Dockerfile ===== | ||
| + | * All dockerfiles start with a parent image or "base image" | ||
| + | * define the base image with '' | ||
| + | * copy files into the container: '' | ||
| + | * example: '' | ||
| + | * set the working directory: '' | ||
| + | * example: '' | ||
| + | * next come the dependencies: | ||
| + | * example: '' | ||
| + | * for the last command in the docker file i.e. start the process: '' | ||
| + | * example: '' | ||
| + | |||