Skip to content

Commit

Permalink
chore: update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
amintalebi committed Dec 11, 2024
1 parent 7f0b678 commit 1364850
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM golang:1.23.0 as builder
WORKDIR /build
COPY . .
RUN go env -w GO111MODULE=on && \
go env -w GOPROXY=https://goproxy.io,direct
COPY . .
RUN go env -w GO111MODULE=on

RUN go mod download

RUN CGO_ENABLED=1 GOOS=linux go build -ldflags=-checklinkname=0 -o main main.go
RUN CGO_ENABLED=1 GOOS=linux go build -o main main.go

FROM gcr.io/distroless/base-debian12

COPY --from=builder /build/main .
ADD store/migrations /migrations
EXPOSE 8080

ENTRYPOINT [ "./main","run","--config","/etc/app/config.yaml"]
ENTRYPOINT [ "./main","run","--config","/etc/app/config.yaml"]

0 comments on commit 1364850

Please sign in to comment.