A fork of Gitea (see branch `mj`) adding Majority Judgment Polls 𐄷 over Issues and Merge Requests. https://git.mieuxvoter.fr
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.

69 lines
1.4 KiB

2 years ago
  1. ###################################
  2. #Build stage
  3. FROM golang:1.16-alpine3.13 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. # Begin env-to-ini build
  19. RUN go build contrib/environment-to-ini/environment-to-ini.go
  20. FROM alpine:3.13
  21. LABEL maintainer="maintainers@gitea.io"
  22. EXPOSE 22 3000
  23. RUN apk --no-cache add \
  24. bash \
  25. ca-certificates \
  26. curl \
  27. gettext \
  28. git \
  29. linux-pam \
  30. openssh \
  31. s6 \
  32. sqlite \
  33. su-exec \
  34. gnupg
  35. RUN addgroup \
  36. -S -g 1000 \
  37. git && \
  38. adduser \
  39. -S -H -D \
  40. -h /data/git \
  41. -s /bin/bash \
  42. -u 1000 \
  43. -G git \
  44. git && \
  45. echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
  46. ENV USER git
  47. ENV GITEA_CUSTOM /data/gitea
  48. VOLUME ["/data"]
  49. ENTRYPOINT ["/usr/bin/entrypoint"]
  50. CMD ["/bin/s6-svscan", "/etc/s6"]
  51. COPY docker/root /
  52. COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
  53. COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
  54. RUN ln -s /app/gitea/gitea /usr/local/bin/gitea