Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Dockerfile 1.3KB

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