Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of this PR is to introduce a
publish
script that simplifies the process of building and publish container images to our registry atghcr.io/uicpharm
, although it's extensible to allow other registry/org values.This script will automatically handle the creation of a custom builder using the
docker-container
driver as outlined in Docker's Multi-platform build documentation. It also will handle the different syntax/logistics for building in Docker versus Podman, although in Podman it forces you to only build for your native architecture.This PR also improves the installers so that they will install all
*.sh
helper scripts that are in thebin
directories, for either the specific OS or the one in theshared
directory. This will make it simpler to add a script to the bunch in the future, without having to edit the installers every time. Furthermore, the docker portion of the installer has been improved so it can be ran over again, which makes it easy to install the Docker-related helper scripts by just re-running thedocker.sh
installer.Why??
Typically, building and publishing of images should happen in a GitHub Actions workflow when a version is tagged. However, if there is any reason why this is impossible/undesirable, this script could be used on a workstation that is capable of building and publishing the images.
For instance, the dcfs-summary project cannot currently build the
linux/arm64
version of the image, because the standardlinux/amd64
arch used by GHA throws errors when trying to build thelinux/arm64
image in its emulation layer (https://github.com/uicpharm/dcfs-summary/issues/2). So, its workflow was adjusted to only publish linux/amd64 images. That way, at least the standard arch used by the server is built. If alinux/arm64
image is desired, a Mac user can rebuild the multi-arch image, since the Mac arch can successful build both, and then publish it to the repository.How to test
After checking out this branch in your
docker-host
directory, execute thedocker.sh
script that is in the directory that matches your OS. Re-runningdocker.sh
will install all scripts, including the newpublish
script.View the Using the publish script docs in the readme. This will give examples of how to run it.