first commit
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM golang:1.24.4-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go build -o main cmd/api/main.go
|
||||
|
||||
FROM alpine:3.20.1 AS prod
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/main /app/main
|
||||
COPY --from=build /app/.env /app/.env
|
||||
EXPOSE 8080
|
||||
CMD ["./main"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user