web-ci/Dockerfile

39 lines
1.6 KiB
Text
Raw Normal View History

FROM alpine:3.19 as build
ARG HUGO_VERSION="0.127.0"
ARG NODE_VERSION="22.2.0"
2023-07-25 11:30:41 +02:00
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
2024-07-17 10:56:42 -04:00
RUN tar -xzf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
2024-07-17 10:56:42 -04:00
2024-07-17 12:10:00 -04:00
RUN cp ./hugo /usr/bin/hugo && hugo version
2024-07-17 12:04:39 -04:00
RUN curl -4 -sL -o node-v${NODE_VERSION}.tar.gz https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz
2024-07-17 12:18:54 -04:00
RUN tar -xzf "node-v${NODE_VERSION}.tar.gz"
WORKDIR node-v${NODE_VERSION}
2024-07-17 12:04:39 -04:00
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
2024-07-17 13:06:03 -04:00
2024-11-06 17:36:47 -05:00
RUN make JOBS=4 BUILDTYPE=Release
2024-07-17 12:04:39 -04:00
RUN make install
FROM alpine:3.20
2023-07-25 11:30:41 +02:00
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 gzip git openssh-client rsync 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
2023-07-25 11:30:41 +02:00
RUN mkdir /home/app
WORKDIR /home/app
ENTRYPOINT ["/bin/bash", "-l", "-c"]