From 976f0180ea795f8b53557ef2a4b9972c6097b60a Mon Sep 17 00:00:00 2001 From: iamjooon2 Date: Thu, 22 Aug 2024 13:43:01 +0900 Subject: [PATCH] test --- Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf44ae1..bbab71d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,24 @@ FROM golang:alpine AS builder -ENV GO1225MODULE=on \ +ENV GO111MODULE=on \ CGO_ENABLED=0 \ GOOS=linux \ GOARCH=amd64 WORKDIR /build -COPY go.mod go.sum main.go ./ + +COPY go.mod go.sum ./cmd/main.go ./ RUN go mod download -RUN go build -o main . +RUN go build -o techbloghub-server . WORKDIR /dist -RUN cp /build/main . + +RUN cp /build/techbloghub-server . FROM scratch -COPY --from=builder /dist/main . -ENTRYPOINT ["/techbloghub"] \ No newline at end of file + +COPY --from=builder /dist/techbloghub-server /techbloghub-server + +EXPOSE 8080 +ENTRYPOINT ["/techbloghub-server"]