All checks were successful
Build And Publish Docker / build-latest (push) Successful in 2h24m48s
38 lines
1.5 KiB
Docker
38 lines
1.5 KiB
Docker
FROM alpine:3.19 as build
|
|
ARG HUGO_VERSION="0.127.0"
|
|
ARG NODE_VERSION="22.2.0"
|
|
|
|
RUN apk add --update --no-cache libssl3 ca-certificates openssl-dev curl ninja pkgconf icu-dev git linux-headers libc6-compat make g++ gcc ada-dev brotli-dev c-ares-dev nghttp2-dev python3 samurai zlib-dev py3-pip libuv-dev
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN curl -4 -sL -o hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz
|
|
|
|
RUN tar -xzf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
|
|
|
RUN cp ./hugo /usr/bin/hugo && hugo version
|
|
|
|
RUN curl -4 -sL -o node-v${NODE_VERSION}.tar.gz https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz
|
|
|
|
RUN tar -xzf "node-v${NODE_VERSION}.tar.gz"
|
|
|
|
WORKDIR node-v${NODE_VERSION}
|
|
|
|
RUN ./configure --prefix=/usr --shared-brotli --shared-zlib --shared-libuv --shared-openssl --shared-cares --shared-nghttp2 --ninja --without-npm --with-intl=system-icu --openssl-use-def-ca-store
|
|
|
|
RUN make JOBS=4 BUILDTYPE=Release
|
|
|
|
RUN make install
|
|
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --update --no-cache c-ares git nghttp2 libcrypto3 icu-libs icu-data-en ca-certificates libgcc libstdc++ libc6-compat linux-headers rsync openssh libuv bash brotli && rm -rf /var/cache/apk/*
|
|
|
|
COPY --from=build /usr/bin/hugo /usr/bin/hugo
|
|
COPY --from=build /usr/bin/node /usr/bin/node
|
|
COPY --from=build /usr/lib/node_modules /usr/lib/node_modules
|
|
COPY --from=build /usr/include/node /usr/include/node
|
|
RUN mkdir /home/app
|
|
WORKDIR /home/app
|
|
|
|
ENTRYPOINT [ "/bin/bash" ]
|