NOT PORTED YET
The build file for a docker image.
- Template
- HariSekhon/Dockerfiles
- Docker Build Best Practices
- Amazing Cache Busting Trick
- Python - Create Smaller Docker Images Using the Builder Pattern
HariSekhon/Templates - Dockerfile
Large repo full of Dockerfiles for different open source technologies full of real world tricks like DockerHub auto-hook scripts to do extra tags, cache busting upon new commits to GitHub repos etc.
https://docs.docker.com/build/building/best-practices
https://sysdig.com/learn-cloud-native/dockerfile-best-practices/
If you're building from GitHub repos that you want to trigger rebuilds upon any change by busting the Docker build cache you can put this in your Dockerfile:
# Cache Bust upon new commits
ADD https://api.github.com/repos/HariSekhon/DevOps-Bash-tools/git/refs/heads/master /.git-hashrefI used this in my HariSekhon/Dockerfiles repo for several of my major GitHub repos like DevOps-Bash-tools and DevOps-Python-tools.
Use the Python builder pattern to make small Python docker images, see this Medium article.
The code for this is in the Dockerfile template above.