diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index 65280ee31d..d0ead72a1c 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -23,11 +23,11 @@ ################################### #Build stage -FROM docker.io/library/golang:1.16-bullseye AS build-env +FROM docker.io/library/golang:1.17-bullseye AS build-env LABEL maintainer="infra-root@openstack.org" -ARG GITEA_VERSION="v1.15.11" +ARG GITEA_VERSION="v1.16.4" ENV TAGS "bindata $TAGS" #Build deps @@ -46,6 +46,17 @@ WORKDIR ${GOPATH}/src/code.gitea.io/gitea RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \ && make clean-all build +# This is a utility the upstream image builds to translate env vars into +# the app.ini config. We primarily rely on ansible for this instead but +# build an include it anyway to stay in sync with upstream tooling. +RUN go build contrib/environment-to-ini/environment-to-ini.go + +# Make things executable since they aren't all that way in git +RUN chmod 755 gitea \ + environment-to-ini \ + docker/root/usr/bin/entrypoint \ + docker/root/usr/local/bin/gitea + ################################### # Basic system setup common to all containers in our pod @@ -79,7 +90,7 @@ COPY --from=build-env /go/src/code.gitea.io/gitea/docker/root / # Copy the app COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea -RUN ln -s /app/gitea/gitea /usr/local/bin/gitea +COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini # Copy our custom templates COPY custom/ /custom/ @@ -99,7 +110,7 @@ EXPOSE 3000 ENV USER git VOLUME ["/data"] ENTRYPOINT ["/usr/bin/entrypoint"] -CMD ["/app/gitea/gitea", "web"] +CMD ["/usr/local/bin/gitea", "web"] USER 1000:1000 ################################### diff --git a/docker/gitea/custom/templates/base/head_navbar.tmpl b/docker/gitea/custom/templates/base/head_navbar.tmpl index 92dc52a48d..a26d6f9e56 100644 --- a/docker/gitea/custom/templates/base/head_navbar.tmpl +++ b/docker/gitea/custom/templates/base/head_navbar.tmpl @@ -1,6 +1,6 @@