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.

46 lines
1.4 KiB

2 years ago
FROM as builder
ARG TAGS="bindata"
RUN echo "deb buster-backports main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends -t buster-backports \
golang nodejs npm make build-essential jq gnupg curl
2 years ago
COPY gitea-key.asc /key.asc
RUN TGZ=`curl -s |jq -r '.assets[].browser_download_url' | grep 'src.*\.tar\.gz$'` && \
curl -L ${TGZ} > /gitea.tar.gz && \
curl -L ${TGZ}.asc > /gitea.tar.gz.asc && \
gpg --import /key.asc && \
gpg --verify /gitea.tar.gz.asc /gitea.tar.gz && \
mkdir /gitea && cd /gitea && \
tar xvzf /gitea.tar.gz
2 years ago
WORKDIR /gitea
# Don't clean the prebuild javascript assets
# npm fails to build them
#RUN make clean-all build
RUN make build
2 years ago
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl gettext git ca-certificates
2 years ago
COPY --from=builder /gitea/gitea /app/gitea/gitea
RUN ln -s /app/gitea/gitea /usr/local/bin/gitea && \
ln -s /data /app/gitea/data
# Copy mods on templates
# we do hide 'users' from public listing
COPY users.tmpl /app/gitea/templates/explore/users.tmpl
2 years ago
VOLUME ["/data"]
ENV HOME /data
2 years ago
ENTRYPOINT ["/app/gitea/gitea"]
CMD ["web", "-c", "/data/conf/app.ini"]