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

Build and run in Docker #424

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Build and run in Docker #424

merged 3 commits into from
Oct 18, 2023

Conversation

martinhpedersen
Copy link
Member

Replaces draft PR #391 which is stalled. FYI @ThreeSixes.

This adds a Dockerfile for building a minimalistic Docker image with Pat. It also adds a docker-compose file as a starting point for those that wishes to experiment with this kind of setup. This is my first attempt of creating a Docker image for public release, following the best practices to the best of my knowledge.

In the future I'd like to configure a Github Actions pipeline for pushing these images to dockerhub. I'd also like add a new repo containing a Docker Compose setup including ARDOPc, Direwolf. It will probably be useful mostly for Linux users, since Docker Desktop on mac/windows does not support sound devices. But for Linux users, I think this could prove to be an easy and convenient way to deploy a robust and reproducable software suite for Winlink. I've already started experimenting with such a system on an old x86 laptop. It would be great to include VARA HF/FM also, but there are licensing issues to consider.

@martinhpedersen martinhpedersen self-assigned this Oct 7, 2023
@ThreeSixes
Copy link

Thanks for taking this over. I've had some life stuff.

Dockerfile Show resolved Hide resolved
Copy link
Contributor

@xylo04 xylo04 left a comment

Choose a reason for hiding this comment

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

Looks good as a first pass!

@martinhpedersen
Copy link
Member Author

Thank you for the review 😄

@martinhpedersen
Copy link
Member Author

I pushed Github Actions workflow for pushing to Docker Hub. Do you mind taking a look at this as well? It seems to be working 🙂

One of the test runs: https://github.com/la5nta/pat/actions/runs/6523720316/job/17714636579

@xylo04
Copy link
Contributor

xylo04 commented Oct 15, 2023

I pushed Github Actions workflow for pushing to Docker Hub. Do you mind taking a look at this as well? It seems to be working 🙂

One of the test runs: https://github.com/la5nta/pat/actions/runs/6523720316/job/17714636579

Looks good! I see it's already published at https://hub.docker.com/r/la5nta/pat.

One curious side note, your callsign/account name seems to be getting replaced in the Actions build logs, e.g. this. It doesn't seem like a problem, just weird.

For my education, I see on Docker Hub there are several digests for different architectures, but it doesn't look like you're having to explicitly build them all in the build step. Do you get containers for all of the different architectures "for free?"

@xylo04
Copy link
Contributor

xylo04 commented Oct 15, 2023

Also, I just noticed you're targeting the master branch instead of develop, I presume that's on purpose since this packaging-related instead of feature-related.

@martinhpedersen
Copy link
Member Author

One curious side note, your callsign/account name seems to be getting replaced in the Actions build logs, e.g. this. It doesn't seem like a problem, just weird.

Yes, I thought so too. I have no idea why it's masked 🤷

For my education, I see on Docker Hub there are several digests for different architectures, but it doesn't look like you're having to explicitly build them all in the build step. Do you get containers for all of the different architectures "for free?"

Yes! Well, almost. If you look closely in the workflow definition you'll see I've added a list of platforms. But basically that's the magic of Docker's Buildx (https://github.com/docker/setup-buildx-action) 😄 It's very neat!

Also, I just noticed you're targeting the master branch instead of develop, I presume that's on purpose since this packaging-related instead of feature-related.

Yes, you assumed correct 🙂 I figured it's ok to commit this directly to master and not tagging a new version, since it does not affect the app itself.

@martinhpedersen martinhpedersen merged commit efb7eaa into master Oct 18, 2023
5 checks passed
@martinhpedersen martinhpedersen deleted the docker branch October 18, 2023 19:31
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.

3 participants