vbrandl.net/Dockerfile

28 lines
664 B
Docker
Raw Normal View History

FROM klakegg/hugo:0.56.3-alpine as build
2019-04-22 12:24:21 +02:00
WORKDIR /usr/src/build
COPY ./ ./
RUN apk --no-cache add --update make
2019-08-10 11:57:36 +02:00
RUN hugo && \
2019-05-01 23:14:51 +02:00
make -C public/ -f ../Makefile
2019-04-22 12:24:21 +02:00
# find ./ -type f \( \
# -name "*.html" \
# -o -name "*.js" \
# -o -name "*.css" \
# -o -name "*.xml" \
# -o -name "*.json" \
# -o -name "*.txt" \
# -o -name "*.png" \
# -o -name "*.ico" \
# -o -name "*.svg" \
# -not -name "*.gz" \) \
# -exec gzip -v -k -9 "{}" \;
# Stage: Run
FROM nginx:alpine
RUN rm /usr/share/nginx/html/*
COPY --from=build /usr/src/build/public /usr/share/nginx/html/
COPY ./.well-known/ /usr/share/nginx/html/.well-known
2019-04-22 12:24:21 +02:00
EXPOSE 80