My Personal Blog https://blog.xirion.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
1.2 KiB

FROM alpine as builder
ENV HUGO_VERSION 0.99.1
ENV GLIBC_VERSION 2.34-r0
WORKDIR /hugo
RUN apk add --no-cache curl wget libstdc++
# Install glibc
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-$GLIBC_VERSION.apk" \
&& apk --no-cache add "glibc-$GLIBC_VERSION.apk" \
&& rm "glibc-$GLIBC_VERSION.apk" \
&& wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-bin-$GLIBC_VERSION.apk" \
&& apk --no-cache add "glibc-bin-$GLIBC_VERSION.apk" \
&& rm "glibc-bin-$GLIBC_VERSION.apk" \
&& wget "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/glibc-i18n-$GLIBC_VERSION.apk" \
&& apk --no-cache add "glibc-i18n-$GLIBC_VERSION.apk" \
&& rm "glibc-i18n-$GLIBC_VERSION.apk"
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-64bit.tar.gz | tar -xz
WORKDIR /build
COPY . .
RUN /hugo/hugo
FROM nginxinc/nginx-unprivileged:mainline-alpine
# Point 404 to 404.html
RUN sed -i 's/#error_page/error_page/g' /etc/nginx/conf.d/default.conf
COPY --from=builder /build/public /usr/share/nginx/html
EXPOSE 8080