Docker Captain Adrian Mouat will present a grab bag of tips and tricks for getting the most out of Docker. These tips are aimed at avoiding common pitfalls, addressing common misunderstandings and making common operations easier.
Topics covered will include:
- Build Processes
- Security
- Volumes
- Databases
- Orchestration
- Debugging and Maintenance
- Calling Docker from Docker
Whilst aimed primarily at new and intermediate users, even advanced users should pick up some new information. This talk will make your daily life with Docker easier!
12. <none>
$ docker image prune
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
Deleted Images:
deleted:
sha256:708624719836212ccb681d5898a64ebfcc4569f3746053766db6
…
Total reclaimed space: 3.677 GB
Cleaning Up
13. $ docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
6e5033be3e106d04912fb91b966abc693b77ae47d85946190bdbe73c4811
…
Total reclaimed space: 304.6 MB
Cleaning Up
14. $ docker volume prune
WARNING! This will remove all volumes not used by at least
one container.
…
Total reclaimed space: 3.494 GB
$ docker network prune
WARNING! This will remove all networks not used by at least
one container.
Are you sure you want to continue? [y/N] y
Deleted Networks:
...
Cleaning Up
15. $ docker system prune
WARNING! This will remove:
- all stopped containers
- all volumes not used by at least one container
- all networks not used by at least one container
- all dangling images
Cleaning Up
21. FROM rust:1.20 as builder
…
RUN cargo build --release --target x86_64-unknown-linux-musl
FROM scratch
COPY --from=builder /.../release/mybin /mybin
USER 65534
CMD ["/mybin"]
Minimal Images
47. Good Defaults for Node and Docker - Bret Fisher
12 Fractured Apps - Kelsey Hightower
Least Privilege Containers - Nathan McCauley and Diogo Monica
Gosu - sudo for containers by Tianon Gravi
tini - minimal init system for containers by Thomas Orozco
Docker Containers on the Desktop - Jessie Frazelle
Frequently Asked Queries from StackOverflow - Brandon Mitchell
References
48. Docker Features for Handling Container Death and Resurrection by
Sreenivas Makam
Creating Effective Docker Images - Abby Fuller
Multi-stage builds - Alex Ellis
Do Not Use DinD For CI - Jérôme Petazzoni
Docker Healthchecks - Elton Stoneman
Annotations in the OCI image spec
Thanks to all the captains for discussions!
References