hosting the jump
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 7m43s

This commit is contained in:
Stefan Harmuth 2024-06-02 12:24:27 +02:00
parent 8448692fe9
commit c019be6dc7
4 changed files with 42 additions and 0 deletions

View File

@ -50,3 +50,10 @@ jobs:
context: spamassassin
push: true
tags: git.domainforge.de/public/spamassassin:latest
- name: Build and push JumpHost Container
uses: docker/build-push-action@v2
with:
context: jumphost
push: true
tags: git.domainforge.de/public/jumphost:latest

19
jumphost/Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM debian:bookworm-slim
COPY start_sshd.sh /start_sshd.sh
COPY supervisord.conf /etc/supervisord.conf
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y --purge autoremove && \
apt-get -y install wget python3 python3-venv irssi neomutt ssh supervisor tmux && \
apt-get -y clean && \
touch /var/log/supervisord.log && \
mkdir /var/run/sshd && \
chmod a+x /start_sshd.sh
EXPOSE 22/tcp
VOLUME ["/etc/ssh", "/home", "/var/log"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

7
jumphost/start_sshd.sh Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# make sure host keys exist
ssh-keygen -A
# start sshd
/usr/sbin/sshd -e -D "$@"

View File

@ -0,0 +1,9 @@
[supervisord]
nodaemon=true
childlogdir=/var/log
logfile=/var/log/supervisord.log
[program:sshd]
command=/entry/start_sshd.sh
stdout_logfile=/var/log/sshd.log
redirect_stderr=true