Dockerfile 374 B

123456789101112131415161718
  1. FROM google/golang:latest
  2. ENV TAGS="sqlite redis memcache cert" USER="git" HOME="/home/git"
  3. COPY . /gopath/src/github.com/gogits/gogs/
  4. WORKDIR /gopath/src/github.com/gogits/gogs/
  5. RUN go get -v -tags="$TAGS" github.com/gogits/gogs \
  6. && go build -tags="$TAGS" \
  7. && useradd -d $HOME -m $USER \
  8. && chown -R $USER .
  9. USER $USER
  10. ENTRYPOINT [ "./gogs" ]
  11. CMD [ "web" ]