alpine-plus-plus
Overview
The alpine-plus-plus Docker container consists of Alpine Linux, along with git as well as various GNU tools commonly used for shell scripting. This container is very closely related to gnu-on-alpine. The difference is that alpine-plus-plus includes git, in addition to everything else from the gnu-on-alpine container. Thus, if you need git, choose alpine-plus-plus; and otherwise choose gnu-on-alpine. The base Docker image is the official Alpine Docker image, which was chosen for its small size. On top of Alpine is a single layer that includes git as well as the following GNU tools:
The original motivating use-case is for developing GitHub container actions. GitHub Actions is GitHub's CI/CD platform. GitHub Actions workflows are comprised of individual steps that can invoke Actions that perform a variety of functions. One of the ways to implement an Action is what GitHub calls a container action. This allows for implementing a GitHub Action using any programming languages or tools. In some cases, shell scripting may be sufficient. Thus, this container. It is certainly not limited to usage in GitHub Action development, and can be used for shell scripting tasks that also require the use of git that you need to execute locally, etc.
The alpine-plus-plus container can be pulled from Docker Hub as well as the GitHub Container Registry. When using alpine-plus-plus in the development of a GitHub Container Action, we recommend pulling from the GitHub Container Registry, as it is likely faster for that use-case.
The developers of alpine-plus-plus are not affiliated with any of Alpine Linux, Docker, GNU, or GitHub. We simply use GitHub Actions, and developed this container to help others.
Docker Tags
The Docker tags of the container mirror the Docker tags of the underlying version of Alpine, which follows Semantic Versioning (SemVer). SemVer uses version numbers of the form: MAJOR.MINOR.PATCH, where differences in MAJOR correspond to incompatible changes, differences in MINOR correspond to the 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 (such as
3.22.1
) indicate the SemVer of the Alpine image used as the base. - Tags of the form MAJOR.MINOR (e.g.,
3.22
) correspond to the most recent patch level of the Alpine image used as the base. For example, if3.22.1
is the latest release, then3.22
maps to this as well. - Tags of the form MAJOR (e.g.,
3
) correspond to the most recent patch level of the Alpine image used as the base, with major corresponding to major version. For example, if3.22.1
is the latest release, then3
maps to this as well.
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: Pull the latest image from Docker Hub with the following (replace
latest
with a specific version number if you prefer):
docker pull cicirello/alpine-plus-plus:latest
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/alpine-plus-plus:latest
# The rest of your Dockerfile would go here.
Docker Pull: Pull from the Github Container Registry with:
docker pull ghcr.io/cicirello/alpine-plus-plus:latest
Base Image in a Dockerfile: Use as a base image in a Dockerfile (via the Github Container Registry) with:
FROM ghcr.io/cicirello/alpine-plus-plus: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 alpine-plus-plus, 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. Since the base image is Alpine, this would include the licenses of the components of Alpine; and also includes the licenses of the GNU tools added to the image and the license for git.
Impact on Licenses of Derivatives: If you build and distribute an image containing your software, using alpine-plus-plus as the base image, it is your responsibility to follow the licenses of all of the software contained within the image. At the time of this writing, one of the effects of the combination of those licenses is a constraint on the licensing of such a pre-built image containing your software to the GPL 3.0 or later (derived from the inclusion of bash and the other GNU tools). If you desire a more permissive license for your software, one approach would be to instead distribute a Dockerfile that builds the image containing your software, rather than a pre-built image of your software, which should circumvent the issue since you would no longer be distributing a derivative of GPL licensed software.
Blog Posts About alpine-plus-plus
As the author of the alpine-plus-plus Docker Container, I occasionally post about this, and other software that I maintain on DEV.to. See my DEV.to profile for a full list of such posts. Below is a selection of blog posts specifically about alpine-plus-plus.
gnu-on-alpine and alpine-plus-plus: Two Lightweight Containers for Implementing GitHub Container Actions with Shell Scripting, posted on DEV on February 21, 2023.
This post covers the motivation, purpose, and functionality of gnu-on-alpine and alpine-plus-plus, which are two Docker containers built atop Alpine Linux, and include a variety of shell scripting tools.