summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 15f159643be0169374810785d7bb3e8db9048e62 (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
FROM nginx:alpine

RUN apk add git-daemon cgit certbot certbot-nginx fcgiwrap apache2-utils gcc musl-dev
RUN adduser -D -h /srv/git git

WORKDIR /usr/build/
COPY bootstrap.sh .
COPY main.c .
COPY static ./static

RUN DEBIAN_FRONTEND=noninteractive sh bootstrap.sh

RUN printf "\
  git daemon --reuseaddr --base-path=/srv/git/ /srv/git/ &\n\
  fcgiwrap -f &\n\
  nginx &\n\
  wait -n\n\
  exit $?\
" >> /usr/local/bin/entrypoint

# ssh, http, https, git
EXPOSE 22 80 443 9418

ENTRYPOINT [ "entrypoint" ]