apskel-pos-backend/Dockerfile
aditya.siregar 4d402e32c9 deploy test
2024-06-04 14:25:57 +07:00

27 lines
443 B
Docker

# Build Stage
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 main.go
RUN ls -la /
# Final Stage
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"]