Skip to content

build: apply Dockerfile rules #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG DOCKER_GEN_VERSION=main

# Build docker-gen from scratch
FROM --platform=$BUILDPLATFORM golang:1.23.1-alpine as go-builder
FROM --platform=$BUILDPLATFORM golang:1.23.1-alpine AS go-builder

ENV CGO_ENABLED=0

Expand All @@ -24,7 +24,7 @@ RUN set -eux; \
go env | grep -E 'OS=|ARCH=|ARM=|AMD64='; \
go build -ldflags "-X main.buildVersion=${DOCKER_GEN_VERSION}" -o docker-gen ./cmd/docker-gen

FROM --platform=$TARGETPLATFORM alpine:3.20.3
FROM alpine:3.20.3

ARG DOCKER_GEN_VERSION
ENV DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG DOCKER_GEN_VERSION=main

# Build docker-gen from scratch
FROM --platform=$BUILDPLATFORM golang:1.23.1 as go-builder
FROM --platform=$BUILDPLATFORM golang:1.23.1 AS go-builder

ENV CGO_ENABLED=0

Expand All @@ -24,7 +24,7 @@ RUN set -eux; \
go env | grep -E 'OS=|ARCH=|ARM=|AMD64='; \
go build -ldflags "-X main.buildVersion=${DOCKER_GEN_VERSION}" -o docker-gen ./cmd/docker-gen

FROM --platform=$TARGETPLATFORM debian:12.7-slim
FROM debian:12.7-slim

ARG DOCKER_GEN_VERSION
ENV DOCKER_GEN_VERSION=${DOCKER_GEN_VERSION} \
Expand Down