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

Docker #371

Merged
merged 5 commits into from
Nov 9, 2022
Merged

Docker #371

merged 5 commits into from
Nov 9, 2022

Conversation

jhkennedy
Copy link
Collaborator

@jhkennedy jhkennedy commented Nov 5, 2022

This sets up the mechanics for building a docker container for any PR (to ensure it builds) and and push to main or dev, and then push it to this repositories container registry. See: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

container images will always be tagged with the current version number, and then:

  • for pushes to develop also tagged with test
  • for pushes to main also tagged with latest

Note: I'm using actions I've developed and maintained here:
https://github.com/ASFHyP3/actions
Specifically:

The version number generated for the docker container will be the same as reported by:

git describe --dirty --tags --long --match "*[0-9]*"

which for the current state of this PR, would look like:

v0.1.0-73-g78a27fc

which breaks down to <latest-version-tag>-<commits-since-tag>-g<commit-short-hash>. This will tie any particular docker image directly to the associated commit used to build it, and the "package version" (notably, RAiDER reports a static version based on the version.txt file, which can be out of sync with the git tags; I'll tackle that in a subsequent PR).

If you're on a version tag (or the commit associated with the version tag) the version will be reported just as:

v0.1.0

as expected.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have added an explanation of what your changes do and why you'd like us to include them.
  • I have written new tests for your core changes, as applicable.
  • I have successfully ran tests with your changes locally.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jhkennedy jhkennedy added the enhancement New feature or request label Nov 5, 2022
Comment on lines +48 to +49
ENTRYPOINT ["/usr/bin/bash"]
CMD ["-l"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This right now just gives you a bash shell in the container. I suspect we'll update it to RAiDER.__main__ if/when that's available.

@jhkennedy jhkennedy marked this pull request as ready for review November 8, 2022 21:43
@jhkennedy
Copy link
Collaborator Author

Note: This action needs to be available in the default branch (dev) before it will run.

Co-authored-by: dbekaert <[email protected]>
Copy link
Collaborator

@jlmaurer jlmaurer left a comment

Choose a reason for hiding this comment

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

LGTM

@jhkennedy jhkennedy merged commit eff8720 into dbekaert:dev Nov 9, 2022
@jhkennedy jhkennedy deleted the docker branch November 9, 2022 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants