separate node build commands
This commit is contained in:
parent
d8609ad5e6
commit
b169544774
1 changed files with 17 additions and 22 deletions
35
Dockerfile
35
Dockerfile
|
@ -2,7 +2,7 @@ FROM alpine:3.20 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 && \
|
||||
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 &&
|
||||
echo "Added dependencies"
|
||||
|
||||
WORKDIR /tmp
|
||||
|
@ -11,25 +11,20 @@ RUN curl -4 -sL -o hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz https://gith
|
|||
|
||||
RUN tar -xzf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||
|
||||
RUN cp ./hugo /usr/bin/hugo && \
|
||||
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 && \
|
||||
tar -xzf "node-v${NODE_VERSION}.tar.gz" && \
|
||||
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
|
||||
RUN curl -4 -sL -o node-v${NODE_VERSION}.tar.gz https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz
|
||||
|
||||
WORKDIR node-v${NODE_VERSION}
|
||||
|
||||
RUN tar -xzf "node-v${NODE_VERSION}.tar.gz"
|
||||
|
||||
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 BUILDTYPE=Release
|
||||
|
||||
RUN make install
|
||||
|
||||
FROM alpine:3.20
|
||||
|
||||
|
@ -49,8 +44,8 @@ RUN apk add --update --no-cache \
|
|||
openssh \
|
||||
libuv \
|
||||
bash \
|
||||
brotli \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
brotli &&
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY --from=build /usr/bin/hugo /usr/bin/hugo
|
||||
COPY --from=build /usr/bin/node /usr/bin/node
|
||||
|
|
Loading…
Add table
Reference in a new issue