diff --git a/Dockerfile b/Dockerfile index c00c0b0..e6ab50a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ -FROM golang:1.22.5 +# syntax=docker/dockerfile:1 +FROM golang:1.22.5 AS build WORKDIR /src COPY . . -RUN go build && touch .env +RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/lcp ./main.go && touch .env -CMD ["./lcp-v2"] \ No newline at end of file +RUN ls -l /bin/lcp + +FROM alpine + +RUN apk add --no-cache ca-certificates + +COPY --from=build /bin/lcp /bin/lcp +COPY --from=build /src/.env ./.env + +CMD ["/bin/lcp"]