Skip to content

Commit

Permalink
Added SSH server for JetBrains Gateway with Codespaces. (#7592)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Oct 14, 2024
1 parent f795a67 commit 697583d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .devcontainer/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@ RUN apt-get update && apt-get install -y \
curl \
gnupg2 \
lsb-release \
software-properties-common
software-properties-common \
openssh-server

# Configure SSH server
RUN mkdir /var/run/sshd \
&& echo 'root:Docker!' | chpasswd \
&& sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
&& sed -i 's@session required pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd \
&& echo "export VISIBLE=now" >> /etc/profile

# Expose SSH port
EXPOSE 22

# Start SSH service
CMD ["/usr/sbin/sshd", "-D"]

# Install .NET SDKs (6, 7, 8 and 9)
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
Expand Down Expand Up @@ -42,4 +56,4 @@ RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor |
# Clean up
RUN rm dotnet-install.sh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*

0 comments on commit 697583d

Please sign in to comment.