diff --git a/Dockerfile b/Dockerfile index 73e4f50d..2849a2b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ -ARG GO_VERSION=1.22 - -FROM docker.io/golang:${GO_VERSION}-alpine AS base - -ARG GOSS_VERSION=v0.0.0 -WORKDIR /build - -RUN --mount=target=. \ - CGO_ENABLED=0 go build \ - -ldflags "-X github.com/goss-org/goss/util.Version=${GOSS_VERSION} -s -w" \ - -o "/release/goss" \ - ./cmd/goss - -FROM alpine:3.19 - -COPY --from=base /release/* /usr/bin/ - -RUN mkdir /goss -VOLUME /goss +ARG GO_VERSION=1.22 + +FROM docker.io/golang:${GO_VERSION}-alpine AS base + +ARG GOSS_VERSION=v0.0.0 +WORKDIR /build + +RUN --mount=target=. \ + CGO_ENABLED=0 go build \ + -ldflags "-X github.com/goss-org/goss/util.Version=${GOSS_VERSION} -s -w" \ + -o "/release/goss" \ + ./cmd/goss + +FROM alpine:3.19 + +COPY --from=base /release/* /usr/bin/ + +RUN mkdir /goss +VOLUME /goss