takunomi-blog/Dockerfile

18 lines
413 B
Docker
Raw Permalink Normal View History

2023-11-09 19:58:53 +00:00
# syntax=docker/dockerfile:1
FROM golang:1.21
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
# TODO: this can be improved to be dynamically loaded
# Also, Dockerfile COPY seems horrible for copying multiple folders. Why?
COPY css ./css
COPY images ./images
COPY templates ./templates
COPY posts ./posts
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /takunomi-blog
CMD ["/takunomi-blog", "ext"]