From 6b856af3929b2a0d2248cec46a99d506c7e6fe21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20DA=20ROCHA?= <sebastien@da-rocha.net>
Date: Thu, 29 Nov 2018 11:47:12 +0100
Subject: [PATCH] [doc] Document Docker installation

---
 README.md             |  1 +
 doc/install_docker.md | 65 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 doc/install_docker.md

diff --git a/README.md b/README.md
index 2d7ecb67..58de45ca 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,7 @@ pip3 install silkaj --user
 - [Install with Pip](doc/install_pip.md)
 - [Install with pipenv](doc/install_pipenv.md)
 - [Install with the build](doc/install_build.md)
+- [Install with docker](doc/install_docker.md)
 - [Build an executable with Pyinstaller](doc/build_with_pyinstaller.md)
 
 ## Usage
diff --git a/doc/install_docker.md b/doc/install_docker.md
new file mode 100644
index 00000000..70de7ec5
--- /dev/null
+++ b/doc/install_docker.md
@@ -0,0 +1,65 @@
+# Install Silkaj with docker
+
+This page is not meant to be a tutorial on docker, it just give some hints on deploying/using/developping silkaj with docker
+
+## Developping with docker Debian oldstable
+
+```
+FROM debian:jessie
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+# optionnel, passe en UTF-8 et en français
+RUN apt-get update ; apt-get install -y locales
+RUN sed -i 's/^# *\(fr_FR.UTF-8\)/\1/' /etc/locale.gen && locale-gen
+ENV LANG fr_FR.UTF-8
+ENV LANGUAGE fr_FR:en
+ENV LC_ALL fr_FR.UTF-8
+
+RUN apt-get update -y ; apt-get install -y git python3-pip libssl-dev
+
+RUN git clone https://git.duniter.org/clients/python/silkaj.git
+WORKDIR /silkaj
+
+RUN apt-get install -y build-essential libffi-dev
+RUN pip3 install -e .
+```
+
+## Developping with docker Ubuntu 18.04
+```
+FROM ubuntu:bionic
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+# optionnel, passe en UTF-8 et en français
+RUN apt-get update ; apt-get install -y locales
+RUN locale-gen fr_FR.UTF-8
+ENV LANG fr_FR.UTF-8
+
+RUN apt-get update -y ; apt-get install -y git python3-pip libssl-dev
+
+RUN git clone https://git.duniter.org/clients/python/silkaj.git
+WORKDIR /silkaj
+
+RUN pip3 install -e .
+```
+
+## Using docker-compose
+
+```
+---
+version: "3"
+services:
+  silkaj:
+    build: .
+#   volumes:
+#   - "${SOURCE_PATH:-./}:/silkaj"
+    command: bin/silkaj info
+```
+
+You can launch silkaj with the following command :
+```
+docker-compose run silkaj bin/silkaj <command>
+```
+
+You can mount your code in he /silkaj dir, the source needs to be 0.6.0 or greater.
-- 
GitLab