gitblog1
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM golang:1.21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go build -o gitblog main.go
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
COPY --from=builder /app/gitblog .
|
||||
COPY --from=builder /app/web ./web
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./gitblog"]
|
Reference in New Issue
Block a user