translate / pootle

Online translation tool
http://pootle.translatehouse.org
GNU General Public License v3.0
1.49k stars 284 forks source link

Have Official Docker images on Docker hub for releases #6877

Open madpipeline opened 5 years ago

madpipeline commented 5 years ago

I see there is some Docker support in master, but the Dockerfiles are looking like they are made for the development of Pootle, not for production use. Also there are no Dockerfiles in the release tags.

Having Official Docker images on https://hub.docker.com would greatly benefit Pootle because:

I haven't seen any documentation regarding the Docker set-up except PR #6846, which hasn't been touched in a few months.

In order to get the Docker images on the Docker Hub, we need to:

madpipeline commented 5 years ago

@phlax can you offer some feedback please on the status of Docker usage within Pootle? Developement and production wise.

phlax commented 5 years ago

hi @ovidiub13

Its been a while since I worked on this, and im busy with some other things at the moment but ill summarize the current situation as best i can.

There is a multi-stage docker recipe here https://github.com/translate/pootle/blob/master/docker/Dockerfile which has some customizable ARG s which IIRC allow you to build differently for dev/production usage.

Currently the default with that recipe is to use 2.9x which is not very stable and needs some work/bugfixing.

The main benefit of the multi-stage approach is that it produces relatively small images.

The current travis run (which seems to be failing) uses this recipe so is a useful starting point for customizing your usage - https://github.com/translate/pootle/blob/master/.travis.yml - it uses various scripts here https://github.com/translate/pootle/tree/master/docker/bin to build/run/publish the images

Its set up so that a successful travis run on the production branch will publish to dockerhub - https://hub.docker.com/r/translate/pootle/tags/

Im happy to review PRs regarding the recipe and/or share access to dockerhub if this is required/helpful.

phlax commented 5 years ago

...regarding making an official image, the requirements are quite strict, not sure if these are met atm, but i think what is there would probs be a good starting point