Some checks failed
Build And Publish Docker / build (0.127.0, 22) (push) Failing after 2m0s
58 lines
No EOL
1.7 KiB
Docker
58 lines
No EOL
1.7 KiB
Docker
FROM alpine:3.20 as build
|
|
ARG HUGO_VERSION="0.127.0"
|
|
ARG NODE_VERSION="22.2.0"
|
|
|
|
RUN apk add --update --no-cache xz 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 -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 && \
|
|
tar -xvzf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" && \
|
|
cp ./hugo /usr/bin/hugo && \
|
|
hugo version
|
|
|
|
RUN curl -sL -o node-v${NODE_VERSION}.tar.xz https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.xz && \
|
|
tar -xvJf "node-v${NODE_VERSION}.tar.xz" && \
|
|
cd node-v${NODE_VERSION} && \
|
|
./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 && \
|
|
make BUILDTYPE=Release && \
|
|
make install
|
|
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --update --no-cache \
|
|
brotli \
|
|
zlib \
|
|
libuv \
|
|
openssl \
|
|
c-ares \
|
|
nghttp2 \
|
|
icu \
|
|
ca-certificates \
|
|
libgcc \
|
|
libstdc++ \
|
|
libc6-compat \
|
|
linux-headers \
|
|
rsync \
|
|
openssh \
|
|
npm \
|
|
&& 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/sh" ] |