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

Add docker support #11

Merged
merged 4 commits into from
Sep 9, 2023
Merged

Conversation

cyberbit
Copy link
Contributor

@cyberbit cyberbit commented Sep 7, 2023

Here is a Dockerfile I got working, supporting compose and run. It launches the binary through supervisor to manage any unhandled crashes. The compose file points to my own published image at the moment (https://hub.docker.com/r/cyberbit/satpaper), but replacing image: cyberbit/satpaper with build: . allows building the image locally.

The final image from Docker Hub is around 30 MB compressed, or ~1.5 Satpaper cycles.

@Colonial-Dev
Copy link
Owner

I like the idea, but I just want to check something first - what's the maintenance burden on a Docker config? I'm pretty sure it's basically nothing, but Docker isn't really my forte and I want to know what I'm getting myself into :p

Also, would it be possible to put everything into a docker/ subdir? I have a bad feeling that people will skim the file list and think it only supports Docker or something 😅

@cyberbit
Copy link
Contributor Author

cyberbit commented Sep 7, 2023

what's the maintenance burden on a Docker config?

As you say, basically nothing. I have built this out as an Alpine Linux image, so as long as satpaper continues to support Linux it should Just Work™️. If it does require a libfoo in the future, it can be added to the Dockerfile trivially via apk at build time.

A Docker build is something that can be done via Actions as well, so I will take some time to put together that too. I also realize now you have tests prepared, so I will update the build to check those before the image is packaged.

would it be possible to put everything into a docker/ subdir?

Yes, I'll update the PR.

@cyberbit
Copy link
Contributor Author

cyberbit commented Sep 9, 2023

PR updated:

  • Moved tooling to docker/
  • Added build-docker to the Cargo Comprehensive action. This runs the minimum necessary for cargo test --release within Docker.

An automatic Docker Hub release can be done (https://docs.docker.com/build/ci/github-actions/push-multi-registries/) but if you don't want to do a Docker Hub account, I can keep my published fork updated to the best of my ability.

@Colonial-Dev Colonial-Dev merged commit baab185 into Colonial-Dev:master Sep 9, 2023
@Colonial-Dev
Copy link
Owner

Thanks for the contribution! And yeah, probably best for you to do the Docker Hub upkeep :p

Colonial-Dev added a commit that referenced this pull request Sep 11, 2023
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.

None yet

2 participants