aboutsummaryrefslogtreecommitdiff
path: root/code-host/Dockerfile
blob: d7392fe5885e0ba5de23892a362a7dd77783b279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM alpine:edge
LABEL maintainer="Mike Crute <mike@crute.us>"

# locale-gen en_US.UTF-8 && \

RUN set -euxo pipefail; \
    apk --no-cache add \
        bash \
        cgit \
        dumb-init \
        gitolite \
        nginx \
        openssh \
        perl-json \
        py3-pygments \
        py3-docutils \
        runit \
        su-exec \
        uwsgi \
        uwsgi-cgi \
        uwsgi-router_static \
    ; \
    rm -rf /etc/nginx; \
    mkdir -p /srv/nginx-conf /logs; \
    ln -s /usr/bin/rst2html /usr/bin/rst2html.py; \
    addgroup -g 1005 -S code; \
    adduser -u 1005 -s /bin/sh -S -h /srv/code -H -D -G code code;

ADD etc/ /etc/
ADD code.crute.me /srv/nginx-conf/
ADD nginx_bootstrap /

ENV ACTIVE_PROFILE INTERNAL
ENV NGINX_PP_DISABLE_SSL_DEFAULT true

STOPSIGNAL SIGHUP
CMD [ "/usr/bin/dumb-init", "/sbin/runsvdir", "/etc/service" ]