Multi architecture container image #350
Merged
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.
This PR would allow for a multi-architecture container image to be built and (sometimes) pushed to Docker hub when necessary.
In order for this to work, 2 things were done:
chartmuseum
executable inside a Docker container in a portable way.docker buildx
and "cross-build" the container image for multiple architectures.In order for this to work, 2 secrets need to be added to the
helm/chartmuseum
GitHub repository.The first one called DOCKER_USERNAME should be the Docker hub username for the "chartmuseum" account.
The second one called DOCKER_PASSWORD should be an access token generated on Docker hub like explained here.
The images will be built for the following architectures:
The images will be built (and sometimes pushed) in the following circumstances:
chartmuseum/chartmuseum:X.Y.Z
andchartmuseum/chartmuseum:latest
)chartmuseum/chartmuseum:edge
andchartmuseum/chartmuseum:latest
)golang
image and thealpine
image (built and pushed aschartmuseum/chartmuseum:nightly
andchartmuseum/chartmuseum:latest
)In order to test this would work, I have built and deployed the multi-architecture image to my own Docker hub account and tested it on the armv8 architecture.
If someone wants to test any other architecture, the image can be found here.
This PR resolves #349 .