Using Docker with Packages
The container registry of GitHub is ghcr.io
. Container images can be owned by an organization or personal account, but you can customize the access to each of them. By default, the images inherit the visibility and permission model of the repository where the workflow is run.
If you want to try it out yourself, you can find the step-by-step guide here: https://github.com/wulfland/container-demo. Follow these steps to understand what the build does:
- Create a new repository called
container-demo
and add a very simpleDockerfile
(without extension):FROM alpine CMD ["echo", "Hello World!"]
The Docker image inherits from the alpine distribution and outputs Hello World!
to your console. If you are new to Docker and want to try it out, clone the repository and change your directory in the root of the local repository. Build the image for the container:
$ docker build -t container-demo
And then run the container:
$...