Files
projects/Dockers/remote-node-container/Dockerfile
T
Bram b516c942df
Build and Push Docker Images / build-and-push (push) Successful in 1m26s
try with local repo
2025-11-06 16:28:50 +01:00

50 lines
1.1 KiB
Docker

# Use an official Node.js runtime as a parent image
FROM node:22-slim
# Set the working directory
WORKDIR /workspace
# Install PM2 globally
RUN npm install -g pm2
# Install git, openssh-client, openssh-server, and other necessary packages
RUN apt-get update && apt-get install -y \
git \
openssh-client \
openssh-server \
iputils-ping \
software-properties-common \
sudo \
curl \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install additional package managers
RUN npm install -g pnpm
RUN curl -fsSL https://bun.sh/install | bash
# Clone and setup linux-presets
RUN git clone http://192.168.179.104:3000/Bram/linux-presets.git && \
cd linux-presets && \
chmod +x setup.sh && \
./setup.sh --terminal-icon 󰎙 && \
cd .. && \
rm -rf linux-presets
# Add root to sudo group
RUN usermod -aG sudo root
# Create a directory for the SSH keys
RUN mkdir -p /root/.ssh
# Copy the entrypoint script into the container
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Expose ports
EXPOSE 3000 22
# Set the entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]