Files
personal-blog/Dockerfile

14 lines
238 B
Docker

FROM golang:alpine as builder
WORKDIR /app
COPY . .
RUN go install github.com/gohugoio/hugo@latest
RUN hugo --minify
FROM nginx:alpine
COPY --from=builder /app/public /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]