Skip to content

Instantly share code, notes, and snippets.

Created March 28, 2017 10:33
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Python with texpdf binary
FROM python:2.7
MAINTAINER Solberg Audunsson <>
# 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:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \
&& echo "deb 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 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:
RUN wget && \
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
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