Files
paralus/Dockerfile.synchronizer
Akshay Gaikwad 0c1b581dd3 Reduce go binary size be removing symbol table
Optimize binary file size to perform deployment faster.
2022-06-14 12:22:24 +05:30

15 lines
345 B
Docker

FROM golang:1.17 as build
LABEL description="Build container"
ENV CGO_ENABLED 0
COPY . /build
WORKDIR /build
RUN go build -ldflags "-s" -o start-sync scripts/kratos/providers_sync.go
FROM scratch as runtime
LABEL description="Run container"
WORKDIR /usr/bin
COPY --from=build /build/start-sync /usr/bin/start-sync
ENTRYPOINT ["./start-sync"]