Dis4IRC
Dis4IRC copied to clipboard
Add a dockerfile
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
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?
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).
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.
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.
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.
https://hub.docker.com/repository/docker/lucyymc/dis4irc