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.

67 lines
1.5 KiB

  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 2222 3000
  21. RUN apk --no-cache add \
  22. bash \
  23. ca-certificates \
  24. gettext \
  25. git \
  26. gnupg
  27. RUN addgroup \
  28. -S -g 1000 \
  29. git && \
  30. adduser \
  31. -S -H -D \
  32. -h /var/lib/gitea/git \
  33. -s /bin/bash \
  34. -u 1000 \
  35. -G git \
  36. git && \
  37. echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
  38. RUN mkdir -p /var/lib/gitea /etc/gitea
  39. RUN chown git:git /var/lib/gitea /etc/gitea
  40. COPY docker/rootless /
  41. COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea
  42. USER git:git
  43. ENV GITEA_WORK_DIR /var/lib/gitea
  44. ENV GITEA_CUSTOM /var/lib/gitea/custom
  45. ENV GITEA_TEMP /tmp/gitea
  46. #TODO add to docs the ability to define the ini to load (usefull to test and revert a config)
  47. ENV GITEA_APP_INI /etc/gitea/app.ini
  48. ENV HOME "/var/lib/gitea/git"
  49. VOLUME ["/var/lib/gitea", "/etc/gitea"]
  50. WORKDIR /var/lib/gitea
  51. ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
  52. CMD []