Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document step-by-step procedure for creating docker images and publishing them as part of release #3768

Closed
4 tasks
abrokenjester opened this issue Apr 3, 2022 · 7 comments
Assignees
Labels
docker 🔧 internal task a project workflow / setup task not directly impacting end users

Comments

@abrokenjester
Copy link
Contributor

The process to create docker images for different architectures and to publish them to dockerhub as part of the release process is poorly documented. As a result we tend to forget to do this.

  • the build script in src/main/dist/docker currently fails
  • there are no clear instructions on how to build images for both amd and arm architectures
  • there are no clear instructions on how to set both version tag and 'latest' tag and publish the images to dockerhub
  • there should be a reminder as part of the release process/script somewhere to take care of this
@abrokenjester abrokenjester added 🔧 internal task a project workflow / setup task not directly impacting end users docker labels Apr 3, 2022
@barthanssens barthanssens self-assigned this Apr 3, 2022
@barthanssens
Copy link
Contributor

Yeah, I'll have to update and improve the outdated docs on https://rdf4j.org/documentation/developer/releases/#optional-publishing-docker-images

@abrokenjester
Copy link
Contributor Author

Oh, I hadn't even seen that! I was looking at the Readme.dev in assembly/src/dist/docker. We should perhaps remove that or at least link them.

@barthanssens
Copy link
Contributor

Hmz yes, some cleanup is needed :-) And perhaps having (another) look at the procedure since support for multiple platforms is easier / more common than it used to be

@barthanssens
Copy link
Contributor

barthanssens commented Apr 26, 2022

@barthanssens
Copy link
Contributor

barthanssens commented Apr 26, 2022

So instead of manually creating separate tags per architecture, this can "now" (well, since quite a while) be handled automatically by docker / hub.docker itself.

So one can just go to the directory containing the Dockerfile and do

docker buildx build --platform=linux/amd64,linux/arm64 .

This requires that the base image being used is available for these platforms, but for RDF4J this should not be a problem (basic tomcat image is available for amd64 and arm64)

What also can be handled in 1 single Dockerfile (instead of requiring a shell script) is building the project in a "first stage" (either do a complete build via mvn, or just download the zip from the rdf4j website) , then copying the result to the second stage using COPY --from

@barthanssens
Copy link
Contributor

For automation, this action might be useful: https://github.com/docker/build-push-action

@barthanssens
Copy link
Contributor

I think this one can be closed, see also #4243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker 🔧 internal task a project workflow / setup task not directly impacting end users
Projects
None yet
Development

No branches or pull requests

2 participants