2018-12-13 07:18:34 +00:00
|
|
|
# Lastet phusion baseimage as of 20180412, based on ubuntu 18.04
|
2016-11-14 06:47:40 +00:00
|
|
|
# See https://hub.docker.com/r/phusion/baseimage/tags/
|
2018-12-13 07:18:34 +00:00
|
|
|
FROM phusion/baseimage:0.11
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2018-04-12 09:49:41 +00:00
|
|
|
ENV UPDATED_AT=20180412 \
|
2016-11-14 06:47:40 +00:00
|
|
|
DEBIAN_FRONTEND=noninteractive
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2016-11-25 07:00:06 +00:00
|
|
|
CMD ["/sbin/my_init", "--", "bash", "-l"]
|
|
|
|
|
2019-03-14 09:18:48 +00:00
|
|
|
RUN apt-get update -qq && apt-get -qq -y install nginx
|
2016-11-12 07:50:20 +00:00
|
|
|
|
|
|
|
# Utility tools
|
|
|
|
RUN apt-get install -qq -y vim htop net-tools psmisc git wget curl
|
|
|
|
|
2016-11-14 12:21:38 +00:00
|
|
|
# Guidline for installing python libs: if a lib has C-compoment (e.g.
|
|
|
|
# python-imaging depends on libjpeg/libpng), we install it use apt-get.
|
|
|
|
# Otherwise we install it with pip.
|
2018-12-13 07:18:34 +00:00
|
|
|
RUN apt-get install -y python2.7-dev python-ldap python-mysqldb zlib1g-dev libmemcached-dev gcc
|
2016-11-12 07:50:20 +00:00
|
|
|
RUN curl -sSL -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py && \
|
|
|
|
python /tmp/get-pip.py && \
|
|
|
|
rm -rf /tmp/get-pip.py && \
|
2018-06-19 03:38:39 +00:00
|
|
|
pip install -U wheel
|
2016-11-12 07:50:20 +00:00
|
|
|
|
|
|
|
ADD requirements.txt /tmp/requirements.txt
|
|
|
|
RUN pip install -r /tmp/requirements.txt
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2016-11-12 07:15:26 +00:00
|
|
|
COPY services /services
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2016-11-12 07:50:20 +00:00
|
|
|
RUN mkdir -p /etc/service/nginx && \
|
|
|
|
rm -f /etc/nginx/sites-enabled/* /etc/nginx/conf.d/* && \
|
|
|
|
mv /services/nginx.conf /etc/nginx/nginx.conf && \
|
|
|
|
mv /services/nginx.sh /etc/service/nginx/run
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2016-11-14 06:47:40 +00:00
|
|
|
RUN mkdir -p /etc/my_init.d && rm -f /etc/my_init.d/00_regen_ssh_host_keys.sh
|
|
|
|
|
2016-11-25 06:56:23 +00:00
|
|
|
RUN rm -rf \
|
|
|
|
/root/.cache \
|
|
|
|
/root/.npm \
|
|
|
|
/root/.pip \
|
|
|
|
/usr/local/share/doc \
|
|
|
|
/usr/share/doc \
|
|
|
|
/usr/share/man \
|
|
|
|
/usr/share/vim/vim74/doc \
|
|
|
|
/usr/share/vim/vim74/lang \
|
2016-11-25 07:00:06 +00:00
|
|
|
/usr/share/vim/vim74/spell/en* \
|
2016-11-25 06:56:23 +00:00
|
|
|
/usr/share/vim/vim74/tutor \
|
|
|
|
/var/lib/apt/lists/* \
|
2016-11-25 07:00:06 +00:00
|
|
|
/tmp/*
|