codebase
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
FROM docker.io/rusian/hyperbola:latest
|
||||
|
||||
ENV NVM_DIR=/root/.nvm
|
||||
ENV NODE_VERSION=lts/*
|
||||
|
||||
RUN pacman -Syu --noconfirm --noprogressbar \
|
||||
&& pacman -S --noconfirm --noprogressbar \
|
||||
base-devel \
|
||||
doas \
|
||||
curl \
|
||||
ca-certificates \
|
||||
git \
|
||||
rsync \
|
||||
wget \
|
||||
bash \
|
||||
&& pacman -Scc --noconfirm \
|
||||
&& 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 \
|
||||
&& cp "$NVM_DIR/versions/node/$(ls $NVM_DIR/versions/node)/bin/node" /usr/local/bin/node \
|
||||
&& cp "$NVM_DIR/versions/node/$(ls $NVM_DIR/versions/node)/bin/npm" /usr/local/bin/npm \
|
||||
&& cp "$NVM_DIR/versions/node/$(ls $NVM_DIR/versions/node)/bin/npx" /usr/local/bin/npx \
|
||||
&& useradd -m builder \
|
||||
&& echo "permit nopass builder as root" > /etc/doas.conf \
|
||||
&& chmod 0400 /etc/doas.conf \
|
||||
&& rm -rf "$NVM_DIR/.cache" /tmp/*
|
||||
|
||||
USER builder
|
||||
WORKDIR /home/builder
|
||||
ENV HOME=/home/builder
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user