Created
March 28, 2017 10:33
-
-
Save jokull/882e512efca37c0637149f349b40dced to your computer and use it in GitHub Desktop.
Python with texpdf binary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:2.7 | |
MAINTAINER Solberg Audunsson <[email protected]> | |
# Install uWSGI | |
RUN pip install uwsgi pipenv | |
# Standard set up Nginx | |
ENV NGINX_VERSION 1.9.11-1~jessie | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \ | |
&& echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list | |
RUN apt-get update \ | |
&& apt-get install --force-yes -y ca-certificates nginx=${NGINX_VERSION} gettext-base \ | |
&& rm -rf /var/lib/apt/lists/* | |
# forward request and error logs to docker log collector | |
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | |
&& ln -sf /dev/stderr /var/log/nginx/error.log | |
EXPOSE 80 443 | |
# Finished setting up Nginx | |
# Install Supervisord | |
RUN apt-get update && apt-get install -y supervisor \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Custom Supervisord config | |
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
# TeX Live 2017 | |
RUN echo "deb http://http.debian.net/debian/ jessie main contrib" >> /etc/apt/sources.list && \ | |
apt-get update && \ | |
apt-get install -y perl-modules ttf-mscorefonts-installer vim unzip wget xzdec && \ | |
rm -rf /var/lib/apt/lists/* | |
COPY texlive.docker /texlive.profile | |
# source: https://www.tug.org/texlive/acquire-netinstall.html | |
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ | |
tar -xvf install-tl-unx.tar.gz -C /opt/ && \ | |
rm install-tl-unx.tar.gz && \ | |
./opt/install-tl-2017*/install-tl --profile=/texlive.profile && \ | |
rm -rf /opt/install-tl-2017* | |
ENV PATH="/usr/local/texlive/2017/bin/x86_64-linux:${PATH}" | |
ENV TEXMFLOCAL="/usr/local/texlive/texmf-local" | |
# Install TeX packages | |
RUN tlmgr install roboto fp pgf ms xcolor booktabs colortbl fontaxes mweights | |
# Make NGINX run on the foreground | |
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
# Remove default configuration from Nginx | |
RUN rm /etc/nginx/conf.d/default.conf | |
# Copy the modified Nginx conf | |
COPY nginx.conf /etc/nginx/conf.d/ | |
# Copy the base uWSGI ini file to enable default dynamic uwsgi process number | |
COPY uwsgi.ini /etc/uwsgi/ | |
RUN mkdir /doc | |
WORKDIR /app | |
COPY ./requirements.txt / | |
RUN pip install -r /requirements.txt | |
COPY ./app /app | |
CMD ["/usr/bin/supervisord"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment