Commit 9d5f1c9c authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

Merge branch 'update-production-dockerfile' into 'master'

Update production dockerfile

See merge request !285
parents 0642fadc a4429734
Pipeline #35052 passed with stages
in 4 minutes and 10 seconds
......@@ -3,22 +3,21 @@
FROM continuumio/miniconda3
RUN apt-get update && \
apt-get install -y \
curl \
poppler-utils build-essential libgl1-mesa-glx \
imagemagick libsm-dev libdmtx-dev libdmtx0b \
&& \
apt-get -y --quiet install git supervisor nginx
apt-get install -y libdmtx-dev && \
apt-get install -y git supervisor nginx cron
WORKDIR /app
ADD environment.yml /app/environment.yml
RUN conda env create
ADD environment.yml .
RUN conda env create && conda clean --all
# From https://medium.com/@chadlagore/conda-environments-with-docker-82cdc9d25754
RUN echo "source activate $(head -1 /app/environment.yml | cut -d' ' -f2)" > ~/.bashrc
ENV PATH /opt/conda/envs/$(head -1 /app/environment.yml | cut -d' ' -f2)/bin:$PATH
RUN echo "source activate zesje-dev" > ~/.bashrc
ENV PATH /opt/conda/envs/zesje-dev/bin:$PATH
RUN rm /app/environment.yml
ADD . .
RUN yarn install
RUN yarn build
CMD bash
RUN rm -rf node_modules
ENTRYPOINT [ "/bin/bash" ]
......@@ -66,8 +66,7 @@ on different platforms:
| OS | Command |
|-------------------------------|---------------------------|
| macOS | `brew install libdmtx` |
| Debian <= 9, Ubuntu <= 19.04 | `apt install libdmtx0a` |
| Debian >= 10, Ubuntu >= 19.10 | `apt install libdmtx0b` |
| Debian, Ubuntu | `apt install libdmtx-dev` |
| Arch | `pacman -S libdmtx` |
| Fedora | `dnf install libdmtx` |
| openSUSE | `zypper install libdmtx0` |
......
......@@ -2,7 +2,7 @@
FROM continuumio/miniconda3
RUN apt-get update -y && apt-get install -y libdmtx0b nginx sudo
RUN apt-get update -y && apt-get install -y libdmtx-dev nginx sudo
RUN echo "server { listen 80; location / { proxy_pass http://127.0.0.1:5000; } }" > /etc/nginx/sites-enabled/proxy.conf
RUN rm /etc/nginx/sites-enabled/default
......
......@@ -2,7 +2,7 @@
FROM continuumio/miniconda3
RUN apt-get update -y && apt-get install -y libdmtx0b
RUN apt-get update -y && apt-get install -y libdmtx-dev
WORKDIR /app
......
......@@ -3,7 +3,7 @@
FROM continuumio/miniconda3
RUN apt-get update && \
apt-get install -y libdmtx0b
apt-get install -y libdmtx-dev
WORKDIR /yarn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment