本项目是群体化方法与技术的开源实现案例,在基于Gitea的基础上,进一步支持社交化的协同开发、协同学习、协同研究等群体创新实践服务,特别是针对新一代人工智能技术特点,重点支持项目管理、git代码管理、大数据集存储管理与智能计算平台接入。 https://git.openi.org.cn
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.
 
 
 
 
 
 

66 lines
1.2 KiB

  1. ###################################
  2. #Build stage
  3. FROM golang:1.14-alpine3.11 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 nodejs npm
  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-all build
  17. FROM alpine:3.11
  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. 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