Skip to content

Commit

Permalink
fix: node from offical package
Browse files Browse the repository at this point in the history
  • Loading branch information
Quadrubo committed Jul 19, 2023
1 parent fd1eae8 commit 57ada0c
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
FROM ghcr.io/quadrubo/php-fpm-alpine-s6-nginx:php8.2-alpine3.18 as waky_builder

# Install node
ENV NODE_VERSION=18.16.0
ARG NODE_VERSION=18.16.0

ENV NODE_PACKAGE_URL=https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64-musl.tar.xz
FROM node:${NODE_VERSION}-alpine AS node

RUN apk update && \
apk add --no-cache libstdc++
FROM ghcr.io/quadrubo/php-fpm-alpine-s6-nginx:php8.2-alpine3.18 as waky_builder

RUN curl -fsSLO --compressed $NODE_PACKAGE_URL \
&& tar -xJf "node-v$NODE_VERSION-linux-x64-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
# fi
&& rm -f "node-v$NODE_VERSION-linux-x64-musl.tar.xz" \
# smoke tests
&& node --version \
&& npm --version
COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin

WORKDIR /var/www/html

Expand Down

0 comments on commit 57ada0c

Please sign in to comment.