-
Notifications
You must be signed in to change notification settings - Fork 977
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
Push Docker images as part of the release workflow #1037
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
johnmaguire
changed the title
WIP Dockerfile
Push Docker images as part of the release workflow
Jan 10, 2024
ruzko
reviewed
Feb 15, 2024
I just noticed that this branch had old code, and was not up-to-date with my personal repo's branch. I just pushed an update. |
Closed
wadey
reviewed
Apr 30, 2024
Co-authored-by: Wade Simmons <[email protected]>
Remove the need for Alpine and `/bin/sh` in the docker image. Make it pure go by doing the `mknod` in Go.
johnmaguire
commented
May 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wadey The changes look great. I really like the distroless approach! Thanks for all the help here!
Co-authored-by: John Maguire <[email protected]>
wadey
reviewed
May 1, 2024
wadey
approved these changes
May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #25.
Description
This PR adds a Github Actions workflow to build and push Docker images whenever a new release is tagged. The image is pushed with a version tag, as well as with the
latest
tag. This allows users to choose between manual updates or automatic updates by pinning to thelatest
tag.With this image, you can provide Nebula connectivity to your Docker host while running Nebula inside a container:
In the example above, you must create a
config
directory containing a validconfig.yml
. Here is the same configuration, but with docker-compose:This image also allows overriding the args passed to Nebula:
This can be used to allow using a config directory instead of a config file, for example.
Github Actions Details
If
DOCKERHUB_USERNAME
andDOCKERHUB_TOKEN
are not set, every step in thebuild-docker
job of the release workflow is skipped. This avoids a "failed" status in forks that want to create repo-local releases without pushing to Docker. The tradeoff is that it could indicate a false success when the required variables are not configured.Variables
Required:
DOCKERHUB_USERNAME
(variable)DOCKERHUB_TOKEN
(secret) - must be read/writeOptional:
DOCKER_REPO_NAME
(variable) - defaults to "nebulaoss/nebula"DOCKER_REPO_TAG
(variable) - defaults to "latest" (e.g. can be overridden to "unstable")Todo
nebulaoss/nightly
with its own Docker secrets and repo