Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.65 KB

dockerfile.md

File metadata and controls

45 lines (28 loc) · 1.65 KB

Dockerfile

NOT PORTED YET

The build file for a docker image.

Template

HariSekhon/Templates - Dockerfile

HariSekhon/Dockerfiles

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.

:octocat: HariSekhon/Dockerfiles

Amazing Cache Busting Trick

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-hashref

I used this in my HariSekhon/Dockerfiles repo for several of my major GitHub repos like DevOps-Bash-tools and DevOps-Python-tools.

Python - Create Smaller Docker Images Using the Builder Pattern

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.