From c8605fbd362b5ab535440b2501f29d357d6d7214 Mon Sep 17 00:00:00 2001 From: CapsLock Date: Wed, 7 Apr 2021 16:07:33 +0200 Subject: [PATCH] Added Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ README.md | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4153ee5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM debian:buster + +EXPOSE 2244 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get -y update +RUN apt-get -y install git python3-dev python3-venv python3-pip libcairo-dev libpango1.0-dev locales + +RUN sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=fr_FR.UTF-8 +ENV LANG fr_FR.UTF-8 +ENV LANGUAGE fr_FR:fr +ENV LC_ALL fr_FR.UTF-8 + +RUN git clone https://github.com/spiral-project/copanier /srv/copanier +RUN cd /srv/copanier/ && python3 -m venv venv && . ./venv/bin/activate && pip install wheel && pip install -e . + +RUN dpkg-reconfigure locales +RUN sed -i 's/simple_server(app, port=2244)/simple_server(app, host="0.0.0.0", port=2244)/g' /srv/copanier/copanier/__init__.py +ENTRYPOINT ["/srv/copanier/venv/bin/copanier", "serve"] diff --git a/README.md b/README.md index f0457af..aca9ecd 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,14 @@ source venv/bin/activate pip install -e . ``` +### Running in docker + +To give a try to Copanier quickly, you can use docker: + +```bash +sudo docker build -t copanier:local . +sudo docker run --name copanier --rm -p 2244:2244 copanier:local + ## Run local server Once everything is installed, you can use the `copanier` command to run the server.