30 lines
No EOL
1.1 KiB
Text
30 lines
No EOL
1.1 KiB
Text
# Build stage
|
|
FROM alpine:3.20 AS build
|
|
ARG HUGO_VERSION="0.127.0"
|
|
ARG NODE_VERSION="22"
|
|
|
|
RUN apk add --update --no-cache rsync unzip openssh libssl3 openssl-dev curl ninja pkgconf icu-dev git linux-headers libc6-compat make g++ gcc libgcc libstdc++ python3 py3-pip
|
|
|
|
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 -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" && \
|
|
cp ./hugo /usr/bin/hugo && \
|
|
hugo version
|
|
|
|
RUN curl -sL -o node-${NODE_VERSION}.x.zip "https://github.com/nodejs/node/archive/refs/heads/v${NODE_VERSION}.x.zip" && unzip "node-${NODE_VERSION}.x.zip" &&\
|
|
cd node-${NODE_VERSION}.x && \
|
|
./configure --with-intl=system-icu --ninja --shared-openssl --shared && \
|
|
make && \
|
|
make install
|
|
|
|
# Final stage
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --update --no-cache rsync openssh libssl3 openssl-dev libgcc libstdc++ libc6-compat
|
|
|
|
COPY --from=build /usr/bin/hugo /usr/bin/hugo
|
|
RUN mkdir /home/app
|
|
WORKDIR /home/app
|
|
|
|
ENTRYPOINT [ "/bin/sh" ] |