mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	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
This commit is contained in:
		@@ -2,11 +2,11 @@
 | 
			
		||||
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
 | 
			
		||||
 | 
			
		||||
ARG GOPROXY
 | 
			
		||||
ENV GOPROXY ${GOPROXY:-direct}
 | 
			
		||||
ENV GOPROXY=${GOPROXY:-direct}
 | 
			
		||||
 | 
			
		||||
ARG GITEA_VERSION
 | 
			
		||||
ARG TAGS="sqlite sqlite_unlock_notify"
 | 
			
		||||
ENV TAGS "bindata timetzdata $TAGS"
 | 
			
		||||
ENV TAGS="bindata timetzdata $TAGS"
 | 
			
		||||
ARG CGO_EXTRA_CFLAGS
 | 
			
		||||
 | 
			
		||||
# Build deps
 | 
			
		||||
@@ -72,8 +72,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"]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,11 +2,11 @@
 | 
			
		||||
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
 | 
			
		||||
 | 
			
		||||
ARG GOPROXY
 | 
			
		||||
ENV GOPROXY ${GOPROXY:-direct}
 | 
			
		||||
ENV GOPROXY=${GOPROXY:-direct}
 | 
			
		||||
 | 
			
		||||
ARG GITEA_VERSION
 | 
			
		||||
ARG TAGS="sqlite sqlite_unlock_notify"
 | 
			
		||||
ENV TAGS "bindata timetzdata $TAGS"
 | 
			
		||||
ENV TAGS="bindata timetzdata $TAGS"
 | 
			
		||||
ARG CGO_EXTRA_CFLAGS
 | 
			
		||||
 | 
			
		||||
#Build deps
 | 
			
		||||
@@ -75,14 +75,14 @@ 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
 | 
			
		||||
 | 
			
		||||
# TODO add to docs the ability to define the ini to load (useful to test and revert a config)
 | 
			
		||||
ENV GITEA_APP_INI /etc/gitea/app.ini
 | 
			
		||||
ENV HOME "/var/lib/gitea/git"
 | 
			
		||||
ENV GITEA_APP_INI=/etc/gitea/app.ini
 | 
			
		||||
ENV HOME="/var/lib/gitea/git"
 | 
			
		||||
VOLUME ["/var/lib/gitea", "/etc/gitea"]
 | 
			
		||||
WORKDIR /var/lib/gitea
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user