diff --git a/README.md b/README.md index 2d7ecb671413dc1a44c9bccf83359d416d0155d9..58de45ca88903333786bfd05e1c5c46ffd362119 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 0000000000000000000000000000000000000000..70de7ec57d2806964e66c75dcd6e0d5575d965f5 --- /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.