Skip to content

Docker setup notes

Allan Nordhøy edited this page Apr 23, 2018 · 20 revisions

Installing Pootle on Debian 9 (Stretch) with Docker

Minimum hardware

Your (virtual) machine should have a minimum of 2GB available memory to run the demo (1GB might be enough for small projects). You will also need a minimum of 5GB available disk space (excluding swap if in a VM).

Install the latest Docker engine

following this guide: https://docs.docker.com/install/linux/docker-ce/debian/

apt-get update
apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
apt-get update
apt-get install docker-ce

Use the OverlayFS2 storage driver (optional - but better do it when setting up a server).

This will improve performance, reclaim disk-space properly, not be weird like aufs, and generally make life easier. If you switch to this driver after install, you will have to dump/load or lose all your images.

Add or edit your /etc/docker/daemon.json with the following:

{
    "storage-driver": "overlay2"
}

and then:

systemctl restart docker

Install virtualenv

apt install git virtualenv

Add a "pootle" group/user

useradd \
    -m \
    -d /home/pootle \
    -k /etc/skel \
    -s /bin/bash \
  pootle

Add "pootle" user to docker group

gpasswd -a pootle docker

Create and activate the virtualenv

su pootle
mkdir ~/host
cd ~/host
virtualenv .
. bin/activate

Clone the Pootle repo

(host) git clone https://github.com/translate/pootle

Install host dependencies

(host) cd pootle
(host) pip install -r requirements/host.txt

Run the Pootle demo!

At this point you may want to either set up your production Pootle site - https://github.com/translate/pootle/wiki/Docker-production-notes, or set up a Pootle development environment…

If you just want to try out Pootle, run the demo:

(host) makey demo
Clone this wiki locally