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

Action to publish docker image #121

Merged
merged 15 commits into from
May 31, 2024
Merged

Action to publish docker image #121

merged 15 commits into from
May 31, 2024

Conversation

DCjanus
Copy link
Contributor

@DCjanus DCjanus commented May 5, 2024

Resolve: #93

I have already tested the code of this Pull Request in my own namespace. For details, please see this URL: https://github.com/DCjanus/cargo-machete/pkgs/container/cargo-machete

Since CI is a module that is difficult to debug locally, I have submitted many fragmented commits in this PR, hoping that all my commits will be squashed upon merging.

@bnjbvr
Copy link
Owner

bnjbvr commented May 6, 2024

Hi! Thanks for the contribution, out of curiosity why do you need a Docker image? I think the linked issue has been closed because it was deemed possible to use another step for Github CI workflows, and I'm not sure to see the benefits of using a Docker instance locally — but I might be missing something!

@DCjanus
Copy link
Contributor Author

DCjanus commented May 6, 2024

For some enterprises with strict network isolation, it may be difficult to directly download a binary from GitHub. However, it is relatively easy to copy a binary from another public docker image because the enterprise can build its own mirror internally.

For example, my Dockerfile.ci could be like this:

FROM debian:stable 

COPY --from=ghcr.io/bnjbvr/cargo-machete:latest /usr/local/bin/cargo-machete /usr/local/bin

@bnjbvr
Copy link
Owner

bnjbvr commented May 7, 2024

Ok, makes sense! I've also received good feedback for a docker image for cargo-machete on the fediverse, so I'm happy taking this change.

in terms of process: what does it entail? IIUC, i would need to set up a new Docker repository at bnjbvr/cargo-machete too. Are there other steps that would be required? (like adding the github bot as a collaborator to the Docker repo, maybe? if so, how does one do that?)

There are a few TODOs in your PR, do you plan to implement them or can/should they be done later, when actually required?

@DCjanus
Copy link
Contributor Author

DCjanus commented May 8, 2024

If you are only publishing the image to ghcr.io, you don't need to take any action except approval the workflow and merging this PR.

I prefer to implement the TODOs in the future in order to avoid introducing too many changes in one PR.

@DCjanus
Copy link
Contributor Author

DCjanus commented May 10, 2024

I've also received good feedback for a docker image for cargo-machete on the fediverse

For people who want to gain more idea about this, I'd like to put the link about this feedback here.

https://tutut.delire.party/@bnjbvr/112394931314428509

Copy link
Owner

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Thanks!

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@bnjbvr bnjbvr merged commit 5b91043 into bnjbvr:main May 31, 2024
4 checks passed
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.

Create a docker image?
2 participants