Added sshd to Dockerfile
This commit is contained in:
parent
c95af85c03
commit
72d8abb71c
@ -1,6 +1,6 @@
|
||||
FROM node:20
|
||||
|
||||
# Basic tools
|
||||
# 🧰 Install basic tools
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
@ -9,12 +9,17 @@ RUN apt-get update && apt-get install -y \
|
||||
openssh-server \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set up workspace
|
||||
# 🔐 Configure SSH
|
||||
RUN mkdir -p /var/run/sshd \
|
||||
&& echo "root:devpassword" | chpasswd \
|
||||
&& sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
|
||||
# 🧱 Set up workspace
|
||||
WORKDIR /workspace
|
||||
|
||||
# Optional: Install VS Code Server (commented by default)
|
||||
# 💻 Optional: Install VS Code Server
|
||||
# RUN curl -fsSL https://code-server.dev/install.sh | sh
|
||||
|
||||
# Default shell
|
||||
CMD ["/bin/bash"]
|
||||
# 🚪 Start SSH and fallback to shell
|
||||
CMD service ssh start && bash
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user