mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-28 15:45:44 +03:00
47 lines
2.1 KiB
Docker
47 lines
2.1 KiB
Docker
FROM epicmorg/debian:bookworm
|
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG K_NODE_MAJOR_VERSION=11
|
|
ARG K_NODE_VERSION=${K_NODE_MAJOR_VERSION}.15.0
|
|
ARG K_NODE_URL=https://nodejs.org/dist/v${K_NODE_VERSION}/node-v${K_NODE_VERSION}-linux-x64.tar.gz
|
|
ARG K_NODE_HEADERS_URL=https://nodejs.org/dist/v${K_NODE_VERSION}/node-v${K_NODE_VERSION}-headers.tar.gz
|
|
|
|
##################################################################
|
|
# Node.js 11.x
|
|
##################################################################
|
|
RUN groupadd -g 1337 node && \
|
|
useradd -u 1337 --gid node --shell /bin/bash --create-home node
|
|
|
|
RUN curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" --location ${K_NODE_URL}?$(date +%s) \
|
|
--header 'Cache-Control: no-cache, no-store' \
|
|
--header 'Pragma: no-cache' | tar xzv --strip-components=1 --directory /usr/local/ && \
|
|
rm -rfv /usr/local/CHANGELOG.md /usr/local/LICENSE /usr/local/README.md
|
|
|
|
RUN curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" --location ${K_NODE_HEADERS_URL}?$(date +%s) \
|
|
--header 'Cache-Control: no-cache, no-store' \
|
|
--header 'Pragma: no-cache' | tar xzv --strip-components=1 --directory /usr/local/
|
|
|
|
RUN npm install -g pnpm@5 yarn
|
|
|
|
##################################################################
|
|
# Version after install
|
|
##################################################################
|
|
RUN echo "=============================================" && \
|
|
echo node $(node --version) && \
|
|
echo npm $(npm --version) && \
|
|
echo yarn $(yarn --version) && \
|
|
echo pnpm $(pnpm --version) && \
|
|
echo "============================================="
|
|
|
|
##################################################################
|
|
# cleanup
|
|
##################################################################
|
|
RUN echo "clean up" && \
|
|
apt-get clean -y && \
|
|
apt-get autoclean -y && \
|
|
rm -rfv /var/lib/apt/lists/* && \
|
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
|
rm -rfv /tmp/*
|