Skip to content

Instantly share code, notes, and snippets.

@deserat
Created August 20, 2018 23:25
Show Gist options
  • Save deserat/b666bc74967c15445ff03a3a1fc19a4f to your computer and use it in GitHub Desktop.
Save deserat/b666bc74967c15445ff03a3a1fc19a4f to your computer and use it in GitHub Desktop.
FROM debian:9
# Nothing works if you don't do this first
RUN apt-get update && apt-get upgrade -y
# Set locale to US EN UTF8
RUN apt-get install locales -y && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen && \
locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN dpkg-reconfigure locales
# If you are installing binaries or compiling code output should
# go here so as not to conflict with /usr/local
RUN mkdir /opt/local
# Install base tools
RUN apt-get install -y --no-install-recommends \
wget curl nano zip libzmq3-dev gettext psmisc bash gnupg2 \
libffi-dev g++ libssl-dev postgresql-client
RUN apt-get install -y --force-yes python3 python3-dev python3-pillow \
python3-psycopg2 python3-crypto python3-paramiko python3-pyasn1 \
&& curl -Lkvo get-pip.py https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py \
&& rm get-pip.py
RUN curl -sLk https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install -y nodejs && \
curl -sSk https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get -y install yarn
RUN apt-get -y install libpangocairo-1.0 libxcursor1 libnss3 libcups2 \
libgconf-2-4 libasound2 libatk1.0-0 libgtk-3-0 pngquant libxss1 libx11-xcb-dev
# set npm global node_modules
RUN yarn global add manta
COPY ./base.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY ./package.json package.json
COPY ./package-lock.json package-lock.json
COPY bin /usr/local/bin
# COPY etc /etc
RUN chmod 755 /usr/local/bin/*
RUN apt-get remove -y git-core libzmq3-dev libffi-dev g++ libssl-dev build-essential
# COPY ./keys /root/.ssh/
#RUN chmod 600 /root/.ssh/*
COPY ./gunicorn /srv/configs/gunicorn
RUN mkdir /srv/deploys/
EXPOSE 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment