THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.2KB

  1. ###################################
  2. #Build stage
  3. FROM golang:1.13-alpine3.10 AS build-env
  4. ARG GOPROXY
  5. ENV GOPROXY ${GOPROXY:-direct}
  6. ARG GITEA_VERSION
  7. ARG TAGS="sqlite sqlite_unlock_notify"
  8. ENV TAGS "bindata $TAGS"
  9. #Build deps
  10. RUN apk --no-cache add build-base git
  11. #Setup repo
  12. COPY . ${GOPATH}/src/code.gitea.io/gitea
  13. WORKDIR ${GOPATH}/src/code.gitea.io/gitea
  14. #Checkout version if set
  15. RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
  16. && make clean generate build
  17. FROM alpine:3.10
  18. LABEL maintainer="maintainers@gitea.io"
  19. EXPOSE 22 3000
  20. RUN apk --no-cache add \
  21. bash \
  22. ca-certificates \
  23. curl \
  24. gettext \
  25. git \
  26. linux-pam \
  27. openssh \
  28. s6 \
  29. sqlite \
  30. su-exec \
  31. tzdata
  32. RUN addgroup \
  33. -S -g 1000 \
  34. git && \
  35. adduser \
  36. -S -H -D \
  37. -h /data/git \
  38. -s /bin/bash \
  39. -u 1000 \
  40. -G git \
  41. git && \
  42. echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
  43. ENV USER git
  44. ENV GITEA_CUSTOM /data/gitea
  45. VOLUME ["/data"]
  46. ENTRYPOINT ["/usr/bin/entrypoint"]
  47. CMD ["/bin/s6-svscan", "/etc/s6"]
  48. COPY docker/root /
  49. COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
  50. RUN ln -s /app/gitea/gitea /usr/local/bin/gitea