From 838e601183985efecf3a139384ba2f54a51816aa Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 15 Nov 2023 12:03:43 +0100 Subject: [PATCH] docker: Create "/.dockerenv" if it doesn't exist. When building through the CI builders, detection of the Docker environment doesn't work. So we always create the file manually to make sure the version contains "~docker" in this case. --- docker/proxy/Dockerfile | 3 ++- docker/server/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/proxy/Dockerfile b/docker/proxy/Dockerfile index e308ee1..fb57261 100644 --- a/docker/proxy/Dockerfile +++ b/docker/proxy/Dockerfile @@ -5,7 +5,8 @@ ARG TARGETOS WORKDIR /workdir COPY . . -RUN apk add --no-cache bash git build-base protobuf && \ +RUN touch /.dockerenv && \ + apk add --no-cache bash git build-base protobuf && \ if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make proxy; else \ GOOS=${TARGETOS} GOARCH=${TARGETARCH} make proxy; fi diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 26addc7..401e769 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -5,7 +5,8 @@ ARG TARGETOS WORKDIR /workdir COPY . . -RUN apk add --no-cache bash git build-base protobuf && \ +RUN touch /.dockerenv && \ + apk add --no-cache bash git build-base protobuf && \ if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make server; else \ GOOS=${TARGETOS} GOARCH=${TARGETARCH} make server; fi