-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from ImperialCollegeLondon/ssh-server
Add ssh server support to drunc service
- Loading branch information
Showing
3 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
FROM python:3.11-slim-bookworm | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends git ssh \ | ||
&& apt-get -y install --no-install-recommends git ssh openssh-server \ | ||
&& rm -fr /var/lib/apt/lists/* | ||
|
||
COPY requirements.txt / | ||
RUN pip install --no-cache-dir -r /requirements.txt | ||
|
||
COPY process-manager-no-kafka.json / | ||
|
||
EXPOSE 22 | ||
RUN mkdir -p /root/.ssh && \ | ||
ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N "" && \ | ||
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys | ||
|
||
RUN echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config && \ | ||
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ | ||
echo "UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config | ||
|
||
RUN mkdir -p /usr/src/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters