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

Allow to only push dev-tagged images to Docker Hub. #653

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

gouttegd
Copy link
Contributor

This PR adds a new main target to the top-level Makefile: publish-multiarch-dev. This target builds multi-architecture images of odkfull and odklite,¹ tag them with a dev tag, and publish them to the Docker Hub.

Inside the dev images, the ODK has version number $(VERSION)-dev, to allow users who may use alternatively a dev image and a released image to know which one they are using at any time.

With dev tagged images (obolibrary/odkfull:dev), the obolibrary/odkdev image becomes redundant and this PR removes it. The build-dev target, which uses to build the odkdev image, now builds odkfull:dev.

closes #648

¹ Building and pushing odklite:dev is necessary even if we only need odkfull:dev, since odkfull is built on top of odklite.

Add a new main target `publish-multiarch-dev` to only build and push the
dev-tagged images to the Docker Hub.

Also remove the `obolibrary/odkdev` image, which is redundant with
`obolibrary/odkfull:dev`.
@matentzn
Copy link
Contributor

Awesome! Truly amazing. Thank you so much @gouttegd!

if I run make publish-multiarch-dev today, are you confident I wont accidentally overwrite the current latest? I would like to try it right away.

@gouttegd
Copy link
Contributor Author

I couldn’t test that (the problem with the -multiarch targets is that by definition they suppose pushing someone to the Docker Hub — not something you can test on your own), but see for yourself the core of the publish-multiarch-dev recipe:

docker buildx build $(CACHE) --push --platform $(PLATFORMS) \
                --build-arg ODK_VERSION=$(VERSION)-dev \
                -t $(IM):dev \
                .

There’s no chance this could cause the publication of an image tagged with anything else than dev. If it does, it’s a bug in docker buildx, and I’ll decline all responsibility. :D

@gouttegd gouttegd merged commit c5f7ee6 into master Aug 12, 2022
@gouttegd gouttegd deleted the publish-dev-image branch August 12, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust Makefile to allow pushing only :dev tag to dockerhub
2 participants