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

Publish docker image to GHCR and DockerHub #669

Merged
merged 6 commits into from
Jul 12, 2023
Merged

Conversation

MattF-NSIDC
Copy link
Member

@MattF-NSIDC MattF-NSIDC commented Jul 11, 2023

Description

Build and publish docker images with GH Actions to GHCR and DockerHub

This entails some other changes; for example, we were always mounting code into containers with volumes. Now, we should have the correct version of the code baked in to the container.

Checklist

If an item on this list is done or not needed, simply check it with [x].

  • Config lockfile updated (inv config.export > qgreenland/config/cfg-lock.json)
  • Version bumped if needed (bumpversion (major|minor|patch|prerelease|build)
  • CHANGELOG.md updated
  • Documentation updated if needed
  • New unit tests if needed

Fixes #542 , fixes #564

* Remove mamba from docker image
    * Support micromamba-specific environment activation behavior
* Stop mounting code into docker container
    * Add a dev compose file which mounts code
@MattF-NSIDC MattF-NSIDC force-pushed the publish-docker-image branch 2 times, most recently from 66b5b77 to e13ef65 Compare July 11, 2023 02:49
@MattF-NSIDC
Copy link
Member Author

MattF-NSIDC commented Jul 11, 2023

Published the first latest image:

https://github.com/nsidc/qgreenland/pkgs/container/qgreenland
https://hub.docker.com/repository/docker/nsidc/qgreenland

After publishing with this PR, I changed the workflow triggers so future PRs won't trigger publishes.

Should only push images on tags (versions images) or main branch pushes
("latest").
@MattF-NSIDC MattF-NSIDC marked this pull request as ready for review July 11, 2023 20:22
@MattF-NSIDC MattF-NSIDC mentioned this pull request Jul 12, 2023
5 tasks
@MattF-NSIDC MattF-NSIDC changed the title Publish docker image Publish docker image to GHCR and DockerHub Jul 12, 2023
Copy link
Contributor

@trey-stafford trey-stafford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments with suggestions but otherwise looks great!

.github/workflows/test-and-build.yml Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
@MattF-NSIDC MattF-NSIDC merged commit 93b5b70 into main Jul 12, 2023
1 check failed
@MattF-NSIDC MattF-NSIDC deleted the publish-docker-image branch July 12, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants