summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-06-21 17:08:42 +0200
committerEarl Warren <contact@earl-warren.org>2024-06-23 13:20:40 +0200
commit374964cd0716a3305267e496453cdf709abe9266 (patch)
tree9a130bb0336cd1554257242e226031801007f32d
parentFix the link for .git-blame-ignore-revs bypass (#31432) (diff)
downloadforgejo-374964cd0716a3305267e496453cdf709abe9266.tar.xz
forgejo-374964cd0716a3305267e496453cdf709abe9266.zip
Fix deprecated Dockerfile ENV format (#31450)
See https://docs.docker.com/reference/build-checks/legacy-key-value-format/. Fixes these warnings seen during the docker build: ``` 4 warnings found (use --debug to expand): - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 9) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 75) - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 76) ``` Introduced in: https://github.com/moby/buildkit/pull/4923 (cherry picked from commit 996037fb6a61b1a7f9a0a837fd87bbeab9cad154) Conflicts: Dockerfile.rootless trivial context conflict
-rw-r--r--Dockerfile8
-rw-r--r--Dockerfile.rootless18
2 files changed, 13 insertions, 13 deletions
diff --git a/Dockerfile b/Dockerfile
index c5b472cbb9..eba2fb97d3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,11 +3,11 @@ FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.22-alpine3.20 as build-env
ARG GOPROXY
-ENV GOPROXY ${GOPROXY:-direct}
+ENV GOPROXY=${GOPROXY:-direct}
ARG RELEASE_VERSION
ARG TAGS="sqlite sqlite_unlock_notify"
-ENV TAGS "bindata timetzdata $TAGS"
+ENV TAGS="bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#
@@ -92,8 +92,8 @@ RUN addgroup \
git && \
echo "git:*" | chpasswd -e
-ENV USER git
-ENV GITEA_CUSTOM /data/gitea
+ENV USER=git
+ENV GITEA_CUSTOM=/data/gitea
VOLUME ["/data"]
diff --git a/Dockerfile.rootless b/Dockerfile.rootless
index 484711a932..e255328052 100644
--- a/Dockerfile.rootless
+++ b/Dockerfile.rootless
@@ -3,11 +3,11 @@ FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM code.forgejo.org/oci/golang:1.22-alpine3.20 as build-env
ARG GOPROXY
-ENV GOPROXY ${GOPROXY:-direct}
+ENV GOPROXY=${GOPROXY:-direct}
ARG RELEASE_VERSION
ARG TAGS="sqlite sqlite_unlock_notify"
-ENV TAGS "bindata timetzdata $TAGS"
+ENV TAGS="bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#
@@ -95,17 +95,17 @@ COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_au
#git:git
USER 1000:1000
-ENV GITEA_WORK_DIR /var/lib/gitea
-ENV GITEA_CUSTOM /var/lib/gitea/custom
-ENV GITEA_TEMP /tmp/gitea
-ENV TMPDIR /tmp/gitea
+ENV GITEA_WORK_DIR=/var/lib/gitea
+ENV GITEA_CUSTOM=/var/lib/gitea/custom
+ENV GITEA_TEMP=/tmp/gitea
+ENV TMPDIR=/tmp/gitea
# Legacy config file for backwards compatibility
# TODO: remove on next major version release
-ENV GITEA_APP_INI_LEGACY /etc/gitea/app.ini
+ENV GITEA_APP_INI_LEGACY=/etc/gitea/app.ini
-ENV GITEA_APP_INI ${GITEA_CUSTOM}/conf/app.ini
-ENV HOME "/var/lib/gitea/git"
+ENV GITEA_APP_INI=${GITEA_CUSTOM}/conf/app.ini
+ENV HOME="/var/lib/gitea/git"
VOLUME ["/var/lib/gitea", "/etc/gitea"]
WORKDIR /var/lib/gitea