2017-05-30 20:53:19 +00:00
|
|
|
# vim:ft=dockerfile
|
|
|
|
|
|
|
|
FROM phusion/baseimage:0.9.19
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV HOME /root
|
2017-02-01 23:17:25 +00:00
|
|
|
ENV QUAYDIR /quay-registry
|
|
|
|
ENV QUAYCONF /quay-registry/conf
|
|
|
|
ENV QUAYPATH "."
|
|
|
|
|
|
|
|
RUN mkdir $QUAYDIR
|
|
|
|
WORKDIR $QUAYDIR
|
2017-05-30 20:53:19 +00:00
|
|
|
|
|
|
|
# This is so we don't break http golang/go#17066
|
|
|
|
# When Ubuntu has nginx >= 1.11.0 we can switch back.
|
|
|
|
RUN add-apt-repository ppa:nginx/development
|
|
|
|
|
|
|
|
# Add Yarn repository until it is officially added to Ubuntu
|
2017-05-30 21:06:09 +00:00
|
|
|
RUN curl -sS 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
|
2017-05-30 20:53:19 +00:00
|
|
|
|
|
|
|
# Install system packages
|
2017-05-30 21:06:09 +00:00
|
|
|
RUN apt-get update && apt-get upgrade -y \
|
|
|
|
&& apt-get install -y \
|
2017-05-30 20:53:19 +00:00
|
|
|
dnsmasq \
|
|
|
|
g++ \
|
|
|
|
gdb \
|
|
|
|
gdebi-core \
|
|
|
|
git \
|
|
|
|
jpegoptim \
|
|
|
|
libevent-2.0.5 \
|
|
|
|
libevent-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
libgpgme11 \
|
|
|
|
libgpgme11-dev \
|
|
|
|
libjpeg62 \
|
|
|
|
libjpeg62-dev \
|
|
|
|
libjpeg8 \
|
|
|
|
libldap-2.4-2 \
|
|
|
|
libldap2-dev \
|
|
|
|
libmagic1 \
|
|
|
|
libpq-dev \
|
|
|
|
libpq5 \
|
|
|
|
libsasl2-dev \
|
|
|
|
libsasl2-modules \
|
|
|
|
monit \
|
|
|
|
nginx \
|
|
|
|
nodejs \
|
|
|
|
optipng \
|
|
|
|
openssl \
|
|
|
|
python-dbg \
|
|
|
|
python-dev \
|
|
|
|
python-pip \
|
|
|
|
python-virtualenv \
|
|
|
|
yarn=0.22.0-1 \
|
2017-05-30 21:06:09 +00:00
|
|
|
w3m # 26MAY2017
|
2017-05-30 20:53:19 +00:00
|
|
|
|
|
|
|
# Install cfssl
|
|
|
|
RUN mkdir /gocode
|
|
|
|
ENV GOPATH /gocode
|
|
|
|
RUN curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz && \
|
|
|
|
tar -xvf go1.6.linux-amd64.tar.gz && \
|
|
|
|
mv go /usr/local && \
|
|
|
|
rm -rf go1.6.linux-amd64.tar.gz && \
|
|
|
|
/usr/local/go/bin/go get -u github.com/cloudflare/cfssl/cmd/cfssl && \
|
|
|
|
/usr/local/go/bin/go get -u github.com/cloudflare/cfssl/cmd/cfssljson && \
|
|
|
|
cp /gocode/bin/cfssljson /bin/cfssljson && \
|
|
|
|
cp /gocode/bin/cfssl /bin/cfssl && \
|
|
|
|
rm -rf /gocode && rm -rf /usr/local/go
|
|
|
|
|
|
|
|
# Install jwtproxy
|
2017-05-30 21:06:09 +00:00
|
|
|
RUN curl -L -o /usr/local/bin/jwtproxy https://github.com/coreos/jwtproxy/releases/download/v0.0.1/jwtproxy-linux-x64 \
|
|
|
|
&& chmod +x /usr/local/bin/jwtproxy
|
2017-05-30 20:53:19 +00:00
|
|
|
|
|
|
|
# Install prometheus-aggregator
|
2017-05-30 21:06:09 +00:00
|
|
|
RUN curl -L -o /usr/local/bin/prometheus-aggregator https://github.com/coreos/prometheus-aggregator/releases/download/v0.0.1-alpha/prometheus-aggregator \
|
|
|
|
&& chmod +x /usr/local/bin/prometheus-aggregator
|
2017-05-30 20:53:19 +00:00
|
|
|
|
2017-02-01 23:17:25 +00:00
|
|
|
# Install python dependencies
|
|
|
|
COPY requirements.txt requirements-tests.txt ./
|
|
|
|
RUN virtualenv --distribute venv \
|
|
|
|
&& venv/bin/pip install -r requirements.txt \
|
|
|
|
&& venv/bin/pip install -r requirements-tests.txt \
|
|
|
|
&& venv/bin/pip freeze
|
|
|
|
|
|
|
|
|
2017-05-30 20:53:19 +00:00
|
|
|
# Install front-end dependencies
|
|
|
|
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
2017-06-27 18:56:14 +00:00
|
|
|
COPY static/ package.json tsconfig.json webpack.config.js tslint.json yarn.lock ./
|
2017-05-30 20:53:19 +00:00
|
|
|
RUN yarn install --ignore-engines
|
|
|
|
|
|
|
|
|
2017-02-01 23:17:25 +00:00
|
|
|
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit $QUAYDIR/static/fonts $QUAYDIR/static/ldn /usr/local/nginx/logs/
|
|
|
|
|
|
|
|
COPY external_libraries.py _init.py ./
|
2017-05-30 20:53:19 +00:00
|
|
|
|
|
|
|
RUN venv/bin/python -m external_libraries
|
|
|
|
|
2017-05-30 21:06:09 +00:00
|
|
|
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache
|
|
|
|
|
2017-02-01 23:17:25 +00:00
|
|
|
VOLUME ["$QUAYCONF/stack", "/var/log", "/datastorage", "/tmp", "$QUAYCONF/etcd"]
|
2017-05-30 21:06:09 +00:00
|
|
|
|
2017-05-30 20:53:19 +00:00
|
|
|
EXPOSE 443 8443 80
|