v.0.0.0 initial
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
FROM node:20-slim
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
sudo \
|
||||
openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN echo "node ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/node-sudo \
|
||||
&& chmod 0440 /etc/sudoers.d/node-sudo
|
||||
|
||||
# Pre-create workspace and node_modules with node user permissions
|
||||
RUN mkdir -p /workspace/node_modules && chown -R node:node /workspace
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
USER node
|
||||
|
||||
ARG GIT_USER_NAME
|
||||
ARG GIT_USER_EMAIL
|
||||
|
||||
RUN git config --global user.name "${GIT_USER_NAME}" && \
|
||||
git config --global user.email "${GIT_USER_EMAIL}"
|
||||
Reference in New Issue
Block a user