thelounge / thelounge-docker

🐳 ‎ ‎Docker image for The Lounge, a self-hosted web IRC client
https://ghcr.io/thelounge/thelounge
MIT License
306 stars 73 forks source link

REQ: Allow for pre/next build #42

Closed EnorMOZ closed 6 years ago

EnorMOZ commented 6 years ago

It would be nice to have a tag or use a env var to get the pre/next version to test via docker.

williamboman commented 6 years ago

This is already possible via the build arg THELOUNGE_VERSION.

EnorMOZ commented 6 years ago

Sorry for my ignorance how would you do it via docker compose or via ansible docker_container? I tried setting an env var of THELOUNGE_VERSION to "next" and that didn't work. Would I need to use the exact pre verison like v2.7.0-pre.4 ?

williamboman commented 6 years ago

It's not a traditional environment variable, but a build-time variable (see https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg). THELOUNGE_VERSION can be any valid version of thelounge on npm, so next should be ok.

EnorMOZ commented 6 years ago

Ok so basically I would have to fork it then build it by changing that arg ? Using something like dockerhub then in ansible point to that image instead ?

williamboman commented 6 years ago

Not sure how ansible works, but in essence:

$ git clone https://github.com/thelounge/docker-lounge.git
$ cd docker-lounge
$ docker build -t thelounge:next --build-arg THELOUNGE_VERSION=next .
EnorMOZ commented 6 years ago

Thanks for the help. That did it. I was able to incorporate it into my ansible job. I also found that you have to set pull to no in ansible for it to look at the local registry. Thanks again !!