From 72d8abb71cf8c8dd7bdc4fe46c13e837cac7cd41 Mon Sep 17 00:00:00 2001 From: Gert-Jan Aalderink Date: Wed, 9 Jul 2025 22:22:49 +0200 Subject: [PATCH] Added sshd to Dockerfile --- dev-env/Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dev-env/Dockerfile b/dev-env/Dockerfile index fc6d6d9..30a79cd 100644 --- a/dev-env/Dockerfile +++ b/dev-env/Dockerfile @@ -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