====== docker ====== ===== todo ===== ==== ENTRYPOINT vs CMD ==== The idea is: it should run with AND without the command name. Example with yamllint: * ''docker run --rm local/yamllint --version'' * ''docker run --rm local/yamllint yamllint --version'' See: https://hub.docker.com/r/pipelinecomponents/base-entrypoint ==== docker utils ==== * exemple : ''docker volume cp'' https://github.com/gdiepen/docker-convenience-scripts/blob/master/docker_clone_volume.sh ==== dockerignore ==== https://docs.docker.com/engine/reference/builder/#dockerignore-file ==== labels ==== What to do with labels? * 8-) https://speakerdeck.com/garethr/shipping-manifests-bill-of-lading-and-docker-metadata-and-container * https://github.com/microscaling/microscaling/blob/master/Makefile : Makefile for docker builds with labels and whistles What others do with labels? Examples: * https://docs.openshift.com/container-platform/3.11/creating_images/metadata.html automated workflow labels * https://github.com/projectatomic/ContainerApplicationGenericLabels automated workflow labels Tools : * https://github.com/garethr/docker-label-inspector : linter for Docker Labels Documentation: * https://docs.docker.com/config/labels-custom-metadata/#key-format-recommendations * https://github.com/opencontainers/image-spec/blob/master/annotations.md ==== tags ==== * [[https://github.com/docker-library/faq#whats-the-difference-between-shared-and-simple-tags|What's the difference between "Shared" and "Simple" tags?]] * Basic example with the [[https://github.com/docker-library/docs/tree/master/hello-world|hello-world image]] ==== healthcheck ==== * https://docs.docker.com/engine/reference/builder/#healthcheck * https://howchoo.com/g/zwjhogrkywe/how-to-add-a-health-check-to-your-docker-container * https://blog.sixeyed.com/docker-healthchecks-why-not-to-use-curl-or-iwr/ ===== shell-fu ===== ===== misc ===== * https://pythonspeed.com/articles/importerror-docker/ : python in docker pitfalls * https://github.com/github/super-linter/blob/master/Dockerfile : 50 ''FROM'', then ''COPY'' the world into a final ''alpine'' image.