cicirello/pyaction

By cicirello

Updated 5 months ago

A base Docker image for Github Actions implemented in Python

Image
1

100K+

pyaction

A base Docker image for Github Actions implemented in Python

Docker Image Version (latest by date)Docker Image Size (latest by date)Docker PullsGitHub release (latest by date)buildLicense

Summary

This Docker image is designed to support implementing Github Actions with Python. As of version 4.0.0., it starts with the official python docker image as the base, which is a Debian OS. It specifically uses python:3-slim to keep the image size down for faster loading of Github Actions that use pyaction. On top of the base, we've installed curl, gpg, git, and the GitHub CLI. We added curl and gpg because they are needed to install the GitHub CLI, and they may come in handy anyway (especially curl) when implementing a GitHub Action.

Note: Up through pyaction:3.14.0, we previously used Alpine Linux. However, the GitHub CLI isn't currently supported on Alpine, which is why we have switched the base image.

Multiplatform Image

Version 4.0.0 and Newer: pyaction supports the following platforms:

  • linux/386
  • linux/amd64
  • linux/arm/v7
  • linux/arm64

Version 3.14.0 and Earlier: earlier releases supported the above as well as the following (these are not supported by the GitHub CLI at the present time):

  • linux/arm/v6
  • linux/ppc64le
  • linux/s390x

Source Repository and Builds

The source repository is maintained on GitHub. The images are built on Github and pushed to Docker Hub, as well as the Github Container Registry using Github Actions.

We have twice monthly, automated builds so that we can pick up any updates to the base image, such as Python updates, as well as any updates to the GitHub CLI, etc.

Docker Tags and Versioning Scheme

We use Semantic Versioning for our tags. Semantic Versioning uses version numbers of the form: MAJOR.MINOR.PATCH, where differences in MAJOR correspond to incompatible changes, differences in MINOR correspond to introduction of backwards compatible new functionality, and PATCH corresponds to backwards compatible bug fixes.

Each image pushed to Docker Hub and the Github Container Registry is tagged as follows:

  • The tag latest indicates, well, the latest image.
  • Tags of the form MAJOR.MINOR.PATCH (e.g., 4.0.0).
  • Tags of the form MAJOR.MINOR (e.g., 4.0).
  • Tags of the form MAJOR (e.g., 4).

Installation and Usage

The pre-built image is hosted on both Docker Hub and the Github Container Registry. You can use it in the following ways.

Docker Pull Command

Pull the latest image from Docker Hub with the following (replace latest with a specific version number if you prefer):

docker pull cicirello/pyaction:latest

Pull from the Github Container Registry with:

docker pull ghcr.io/cicirello/pyaction:latest
Use as a base image in a Dockerfile

Use as a base image in a Dockerfile (replace latest with a specific version number if you prefer):

FROM cicirello/pyaction:latest

# The rest of your Dockerfile would go here.

Or you can use as a base image (via the Github Container Registry) with:

FROM ghcr.io/cicirello/pyaction:latest

# The rest of your Dockerfile would go here.

License

Source Code License

The source code, including the Dockerfile and anything else within the Github repository for pyaction, is licensed under the MIT License.

Image Licenses

As with all pre-built Docker images, the image itself (once built, or obtained from Docker Hub or the Github Container Registry) contains software that is covered by a variety of licenses. See the license information for the python docker image, the license for git, the GitHub CLI, and the license for Python.

If you build and distribute an image containing your software, using pyaction as the base image, it is your responsibility to follow the licenses of all of the software contained within the image.

Docker Pull Command

docker pull cicirello/pyaction