21 lines
254 B
Docker
21 lines
254 B
Docker
FROM golang:alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
COPY *.go ./
|
|
|
|
RUN go build -o server .
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/server .
|
|
COPY static/ static/
|
|
COPY templates/ templates/
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["./server"]
|