Closed fitnr closed 1 year ago
Is there a strong reason for the plain executables (e.g. elmfire
) to be removed and replaced named versions (elmfire_2023.0427
?) Having just a plain version name would make using elmfire
inside a container much simpler.
Currently, it looks like the version name is hardcoded into the build script, which makes it hard to use in automated tools.
@fitnr - Thanks for the PR. Since main continued to evolve over the last month it was less time consuming to add most of this manually rather than merge the PR into main.
This adds a github workflow that automatically pushes a new version of the
elmfire
docker image whenever commits are pushed to themain
branch.The script pushes to both github packages and dockerhub, but to push to dockerhub, the repo must have two secrets:
DOCKERHUB_USERNAME
andDOCKERHUB_TOKEN
. The username would beclauten
, the token must be created on docker hub. How to add a secret to the repo: https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repositoryAn example of the image on Github Packages can be found here. You can pull and inspect with:
The
build/docker
directory is removed because it has been replaced by the automated workflow. For simplicity, theDockerfile
has been moved to the root of the repo. I also movedapt-get clean
to the same build step asapt-get install
, which will reduce overall image size.The image size could be further reduced by using an intermediate build so that the final build only contains the elmfire executables. Additionally, I would suggest directories not needed in the image to
.dockerignore
. I only included thedocs
folder to be conservative.