diff --git a/Dockerfile b/Dockerfile index 630c587a..717cfc76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,12 +28,15 @@ FROM scratch AS artifacts COPY --from=build /out/*.tar.gz / COPY --from=build /out/*.zip / +FROM scratch AS binary +COPY --from=build /usr/local/bin/diun* / + FROM alpine:3.14 RUN apk --update --no-cache add \ ca-certificates \ openssl \ - && rm -rf /tmp/* /var/cache/apk/* + && rm -rf /tmp/* COPY --from=build /usr/local/bin/diun /usr/local/bin/diun RUN diun --version diff --git a/docker-bake.hcl b/docker-bake.hcl index f3320252..687ad15a 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -85,6 +85,12 @@ target "docs" { output = ["./site"] } +target "binary" { + inherits = ["_common"] + target = "binary" + output = ["./bin"] +} + target "artifact" { inherits = ["_common"] target = "artifacts"