Recent Articles - Docker

How to Persist Docker Build Arguments as Env Vars

Aug 22, 2021 · 4 min read

Values from the Docker ARG instruction aren't persisted in built images, so here's a quick tip on how to persist them!


Docker Shell vs. Exec Form

Mar 22, 2021 · 5 min read

The RUN, ENTRYPOINT, and CMD, instructions all have two different forms they can be written in, and those forms change how each of those instructions behaves.


You Don't Need an Init System for Node.js in Docker

Mar 20, 2021 · 6 min read

But you do need to think about how your application handles exit signals.


Publishing Docker Images with GitHub Actions

Feb 20, 2021 · 10 min read

Publishing Docker images is a common CI/CD task, and the tight integration GitHub Actions has with GitHub repositories makes it a great tool for the job.


Publishing Docker Images with CircleCI

Feb 15, 2021 · 10 min read

Publishing Docker images is a common CI/CD task, and the flexibility CircleCI offers makes it a great tool for the job.


Linting Dockerfiles with Hadolint

Aug 10, 2020 · 3 min read

Linters don't just enforce style guidelines, they also catch potential issues. hadolint (Haskell Dockerfile Linter) is the most popular linter for Dockerfiles, and it's incredibly easy to use.


What is a Docker Digest?

Aug 9, 2020 · 7 min read

Docker tags are mutable - they can be re-published over and over - so the most specific way an image can be referenced is by its digest.


Keep Docker Base Images Updated with Renovate

Jul 30, 2020 · 7 min read

Just like with libraries used in code, keeping your Docker base images up to date is a good security practice.


Testing Docker Images with Container Structure Test

Jul 18, 2020 · 5 min read

Just because a Docker image builds successfully doesn't mean it will perform as expected. Google's container Structure Test tool helps you check images to make sure they're working as intended.


Reducing Docker Layers

Jun 29, 2020 · 6 min read

Reducing the size of your Docker images is important for a number of reasons, and while there are newer tools such as multi-stage builds, reducing the number of layers in your image may help.


Using Multi-Stage Docker Builds with Go

Jun 4, 2020 · 4 min read

Multi-stage Docker builds can greatly reduce the size of final built images, and the savings can be extreme with Go.


Tunneling a Database Connection with Docker Compose

Aug 7, 2019 · 3 min read

I recently had the need to tunnel a database connection from a local Docker container to a remote MySQL server. The AWS RDS instance is inside the same VPC as a bastion host that runs the SSH server. Rather than open the tunnel on the host machine and have the container connect through host.docker.internal I thought I'd configure it all in one place with Docker Compose.