base-node/Dockerfile
Astound f222b17083
All checks were successful
release / build (push) Successful in 8m55s
codebase
2025-06-23 18:34:45 -05:00

36 lines
901 B
Docker

FROM docker.io/rusian/hyperbola:latest
ENV NODE_VERSION=lts/*
RUN pacman -Syu --noconfirm --noprogressbar \
&& pacman -S --noconfirm --noprogressbar \
base-devel \
doas \
curl \
ca-certificates \
git \
rsync \
wget \
bash \
&& useradd -m builder \
&& echo "permit persist keepenv nopass builder as root" > /etc/doas.conf \
&& pacman -Scc --noconfirm
USER builder
ENV NVM_DIR=/home/builder/.nvm
ENV HOME=/home/builder
WORKDIR /home/builder
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default \
&& npm install -g npm
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc \
&& echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> ~/.bashrc \
&& echo 'nvm use default &>/dev/null' >> ~/.bashrc
CMD ["/bin/bash"]