aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: bb2ed8d307345dd49b814d6437f4eb063b6130c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM google/golang:latest

ENV TAGS="sqlite redis memcache cert" USER="git" HOME="/home/git"

COPY  . /gopath/src/github.com/gogits/gogs/
WORKDIR /gopath/src/github.com/gogits/gogs/

RUN  go get -v -tags="$TAGS" github.com/gogits/gogs \
  && go build -tags="$TAGS" \
  && useradd -d $HOME -m $USER \
  && chown -R $USER .

USER $USER

ENTRYPOINT [ "./gogs" ]

CMD [ "web" ]