Files
gitblog/Dockerfile
2025-09-15 04:02:11 +03:00

23 lines
320 B
Docker

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"]