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 a dockerfile #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add a dockerfile #56

wants to merge 3 commits into from

Conversation

lucyydotp
Copy link

@lucyydotp lucyydotp commented Jun 3, 2021

Adds a Dockerfile to allow running Dis4IRC in a Docker container. I'm more than happy to publish this on docker hub when it's finished.

To use, clone the repo, docker build . then docker run -v /path/to/dir/containing/config:/srv/config <container id>.

Fixes #55

@zachbr
Copy link
Owner

zachbr commented Jun 3, 2021

Hi, thanks for taking a look at this.

My main concern so far is that it looks like it always pulls down the master branch and compiles from that. While I do try and keep master in a state where it is always running, it seems less than ideal to always be distributing that via docker. I can understand that it could also be tedious to keep bumping the docker image on every minor release as well. Is there perhaps a way to make it always fetch the latest release tag and compile that instead?

It seems like there are ways to get the latest git tag from the git CLI, is that something that would fit better do you think?

Dockerfile Outdated Show resolved Hide resolved
@lucyydotp
Copy link
Author

My main concern so far is that it looks like it always pulls down the master branch and compiles from that.

The dockerfile itself isn't responsible for obtaining source, it just builds what you have locally. Realistically, for deployment, you'd use a CI server and build on release (which I'm more than happy to set up on my TC instance if needed).

@zachbr
Copy link
Owner

zachbr commented Jun 5, 2021

Thanks. That makes sense but I’m (obviously) not overly familiar with docker. I suppose I should’ve made that connection myself given the lack of any “pull” action in the docker file.

I have my own TC instance we would probably want to use to maintain releases, but I’d love to see a test version using your instance if it isn’t too much trouble.

kash’s comments about multiple jars should probably be addressed as well. Right now there is always one shaded artifact on build but I imagine we shouldn’t necessarily assume that either. As a docker noob I look forward to your input.

@lucyydotp
Copy link
Author

I’d love to see a test version using your instance if it isn’t too much trouble.

Yeah that's fine, I can do that.

kash’s comments about multiple jars should probably be addressed as well.

I am trying my best here, but Docker is notoriously bad for getting the output of commands into variables that I could then use to get the project version. I have an idea for a shell workaround, I'll try it and let you know.

@lucyydotp
Copy link
Author

Turns out you don't even need a CI server, docker hub will do it all for you. This config will create images any time a new tag is created, creating a Docker tag for it, and also maintains the unstable tag with the latest commit.
image

@lucyydotp lucyydotp marked this pull request as ready for review June 5, 2021 11:29
@lucyydotp lucyydotp requested a review from kashike June 5, 2021 11:29
@lucyydotp
Copy link
Author

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.

Docker support
3 participants