Waiting for MySQL to be Ready in Docker Compose

Had a ... fun thing happen in GitHub Actions today where my tests were starting before the MySQL server they needed was up and running. MySQL in this case was running in Docker compose. So I started my process with a little shell script using mysqladmin: #!/usr/bin/env bash count=0 alive="no" while [ "$count" -lt 5… Continue reading Waiting for MySQL to be Ready in Docker Compose

How to Connect to the Host Machine from a Container on Docker for Mac

I was recently working on a mac-based dev environment and need to proxy from a container running nginx (to handle HTTPS connections) to a server running on the host machine. Docker's host network mode does not work on MacOS as expected given that docker is running inside a VM rather than directly in the host's… Continue reading How to Connect to the Host Machine from a Container on Docker for Mac

One Way to Manage Secrets in Dockerized Applications

Dockerized Application Secrets

Putting configuration in the environment is a fairly well acknowledged best practice now. That configuration often includes secrets. But environment variables in container images -- like the docker ENV stanza -- are not really secure. They are built as part of the image, after all, so anyone with access to the image can get at… Continue reading One Way to Manage Secrets in Dockerized Applications