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.
gitea/Dockerfile

57 lines
1.7 KiB

2 years ago
FROM registry.sindominio.net/debian as builder
ARG TAGS="bindata"
RUN apt-get update && \
apt-get install -y --no-install-recommends make build-essential jq gnupg curl nodejs npm wget
## Install Go 1.17 via Go web
RUN wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz && \
echo "acc512fbab4f716a8f97a8b3fbaa9ddd39606a28be6c2515ef7c6c6311acffde go1.19.1.linux-amd64.tar.gz" > go.checksum && \
sha256sum -c go.checksum && \
rm -rf /usr/local/go && \
rm -rf /usr/bin/go && \
tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz && \
export PATH=/usr/local/go/bin:$PATH
RUN ln -s /usr/local/go/bin/go /usr/bin/go
# Install Gitea
COPY gitea-key.asc /key.asc
RUN TGZ=`curl -s https://api.github.com/repos/go-gitea/gitea/releases/latest |jq -r '.assets[].browser_download_url' | grep 'src.*\.tar\.gz$'` && \
filename=`basename $TGZ` && filename="${filename%.*.*}" && \
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 && \
tar xzf /gitea.tar.gz -C /tmp/ && \
mv /tmp/$filename /gitea
2 years ago
WORKDIR /gitea
# Don't clean the prebuild javascript assets
# npm fails to build them
#RUN make clean-all build
RUN TAGS="bindata sqlite sqlite_unlock_notify" make build
2 years ago
FROM registry.sindominio.net/debian
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
2 years ago
VOLUME ["/data"]
ENV GITEA_CUSTOM /data
ENV HOME /data
2 years ago
ENTRYPOINT ["/app/gitea/gitea"]
CMD ["web", "-c", "/data/conf/app.ini"]