Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjooon2 committed Aug 22, 2024
1 parent 3724571 commit 976f018
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

COPY --from=builder /dist/techbloghub-server /techbloghub-server

EXPOSE 8080
ENTRYPOINT ["/techbloghub-server"]

0 comments on commit 976f018

Please sign in to comment.