This repository has been archived on 2024-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
badhouseplants-net-old/Dockerfile

17 lines
519 B
Docker
Raw Normal View History

FROM alpine:latest AS builder
WORKDIR /src
COPY . /src
ARG GOHUGO_LINK=https://github.com/gohugoio/hugo/releases/download/v0.110.0/hugo_0.110.0_linux-amd64.tar.gz
RUN apk update && apk add curl tar
RUN curl -LJO ${GOHUGO_LINK} && tar -xf hugo_0.110.0_linux-amd64.tar.gz
RUN mv /src/hugo /usr/local/bin/hugo
RUN chmod +x /usr/local/bin/hugo
RUN hugo
FROM nginx:stable-alpine
COPY --from=builder /src/public /var/www
COPY configs/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD [ "nginx", "-g", "daemon off;" ]