fix: add root Dockerfile with backend context
This commit is contained in:
parent
67e38ab0e0
commit
9e3dbe3a33
1 changed files with 13 additions and 0 deletions
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM mirror.gcr.io/library/golang:1.23-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY backend/go.mod backend/go.sum ./
|
||||
RUN go mod download
|
||||
COPY backend/ .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags=" -s -w\ -o main .
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
COPY --from=builder /app/main .
|
||||
COPY --from=builder /app/migrations ./migrations
|
||||
CMD [\.\/main\]
|
||||
Loading…
Reference in a new issue