diff --git a/Dockerfile b/Dockerfile index 08b9f36..13a4735 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ # Build Stage # ---------------------- FROM --platform=$BUILDPLATFORM golang:1.23-bookworm AS builder - WORKDIR /app # Build arguments for cross-compilation @@ -22,15 +21,22 @@ # Build the application RUN \ CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/target/asvec . + ## desire is to use distroless as the final image with sh binary but use alpine for now + # # ---------------------- + # # BusyBox Stage + # # ---------------------- + + # FROM --platform=$TARGETPLATFORM busybox AS busybox -# ---------------------- -# Final Stage -# ---------------------- - FROM --platform=$TARGETPLATFORM gcr.io/distroless/static-debian12 + # ---------------------- + # Final Stage + # ---------------------- + FROM --platform=$TARGETPLATFORM alpine:latest # Copy the binary from the builder stage COPY --from=builder /app/target/asvec /usr/local/bin/asvec - # Set the entrypoint to the asvec binary - ENTRYPOINT ["/usr/local/bin/asvec"] + # Set the entrypoint to the shell + ENTRYPOINT ["/bin/sh", "-c"] + CMD ["/usr/local/bin/asvec"] \ No newline at end of file