2022-11-14 22:44:11 +03:00
|
|
|
FROM epicmorg/gitlab-runner:latest
|
|
|
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
2024-06-21 16:10:08 +03:00
|
|
|
|
2022-11-14 22:44:11 +03:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2024-06-21 16:10:08 +03:00
|
|
|
ARG K_NODE_MAJOR_VERSION=18
|
2024-12-05 18:24:33 +03:00
|
|
|
ARG K_NODE_VERSION=${K_NODE_MAJOR_VERSION}.20.4
|
2024-06-21 16:10:08 +03:00
|
|
|
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
|
|
|
|
|
2022-11-14 22:44:11 +03:00
|
|
|
##################################################################
|
|
|
|
# Node.js 18.x
|
|
|
|
##################################################################
|
2024-06-21 16:10:08 +03:00
|
|
|
RUN groupadd -g 1337 node && \
|
|
|
|
useradd -u 1337 --gid node --shell /bin/bash --create-home node
|
|
|
|
|
2024-12-05 18:24:33 +03:00
|
|
|
ADD ${K_NODE_URL} /tmp
|
|
|
|
ADD ${K_NODE_HEADERS_URL} /tmp
|
2022-11-14 22:44:11 +03:00
|
|
|
|
2024-12-05 18:24:33 +03:00
|
|
|
RUN tar -xvzf /tmp/node-v${K_NODE_VERSION}-linux-x64.tar.gz --strip-components=1 --directory /usr/local && \
|
|
|
|
tar -xvzf /tmp/node-v${K_NODE_VERSION}-headers.tar.gz --strip-components=1 --directory /usr/local && \
|
|
|
|
rm -rfv /usr/local/CHANGELOG.md /usr/local/LICENSE /usr/local/README.md
|
2022-11-14 22:44:11 +03:00
|
|
|
|
2024-06-21 16:10:08 +03:00
|
|
|
RUN npm install -g pnpm yarn
|
2022-11-14 22:44:11 +03:00
|
|
|
|
2024-06-21 16:10:08 +03:00
|
|
|
##################################################################
|
|
|
|
# Version after install
|
|
|
|
##################################################################
|
2022-11-14 22:44:11 +03:00
|
|
|
RUN echo "=============================================" && \
|
|
|
|
echo node $(node --version) && \
|
|
|
|
echo npm $(npm --version) && \
|
|
|
|
echo yarn $(yarn --version) && \
|
2024-02-09 13:47:59 +03:00
|
|
|
echo pnpm $(pnpm --version) && \
|
2022-11-14 22:44:11 +03:00
|
|
|
echo "============================================="
|
|
|
|
|
|
|
|
##################################################################
|
2024-06-21 16:10:08 +03:00
|
|
|
# cleanup
|
2022-11-14 22:44:11 +03:00
|
|
|
##################################################################
|
2024-06-21 16:22:11 +03:00
|
|
|
RUN echo "clean up" && \
|
2024-12-10 01:33:30 +03:00
|
|
|
apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
rm -rfv /var/lib/apt/lists/* && \
|
|
|
|
rm -rfv /var/cache/apt/* && \
|
|
|
|
rm -rfv /root/tmp/* && \
|
|
|
|
rm -rfv /tmp/*
|
2024-12-05 18:24:33 +03:00
|
|
|
|
|
|
|
RUN updatedb
|