From e9b9a367a990468a3130477f856c049c00278da6 Mon Sep 17 00:00:00 2001 From: "aditya.siregar" Date: Mon, 3 Mar 2025 19:29:59 +0700 Subject: [PATCH] add docker file --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..48543ce --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM golang:1.20-alpine AS build + +RUN apk --no-cache add tzdata + +WORKDIR /src +COPY . . + +# RUN CGO_ENABLED=0 GOOS=linux go build -o /app cmd/klinik-core-service +RUN CGO_ENABLED=0 GOOS=linux go build -o /app cmd/legalgo/main.go + +RUN ls -la / + +FROM gcr.io/distroless/static + +WORKDIR / + +COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo +COPY --from=build /app /app + +# RUN ls -la / + +ENV TZ=Asia/Jakarta + +ENTRYPOINT ["/app"]