The ultimate test of your Docker image: Running in GitHub Actions

I thought it would be simple…

Peter Flook
4 min read1 day ago

I sometimes think that I almost know everything that I need for running and deploying Docker images. I’ve run them via docker run, docker compose, inside Minikube, used Helm, in Kubernetes clusters with strict security requirements, as jobs and applications. You name it. But then came along GitHub Actions and it made me rethink my Docker knowledge. I encountered many problems which I will go through below along with solutions.

Background

I have an existing Docker image that can be run as a job or application that I wanted to run as a job within GitHub Actions. To help make it easier for those to use my image, I have created a composite GitHub Action that first checks a repository, then runs some Javascript code that executes the Docker run command for my image. When running my action locally, everything works as expected. Then once run in GitHub Actions, many errors came along.

For reference, you can view all the code in this repository.

GitHub Actions are a great way to run all sorts of things, especially builds and releases. Credit GitHub.

Errors I Faced

Access Denied

This is where my confusion began. I was getting access denied/permission denied when writing to a folder part of the Docker volume.

--

--