diff --git a/cnt-build.sh b/cnt-build.sh new file mode 100755 index 0000000..b1e3e44 --- /dev/null +++ b/cnt-build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +exec podman build --tag localhost/debian-ssh -f debian-ssh.Containerfile . diff --git a/cnt-run.sh b/cnt-run.sh new file mode 100755 index 0000000..1f69958 --- /dev/null +++ b/cnt-run.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +exec podman run --detach --replace --name debian-ssh --publish=\[::\]:2222:22 localhost/debian-ssh diff --git a/debian-ssh.Containerfile b/debian-ssh.Containerfile new file mode 100644 index 0000000..3a16898 --- /dev/null +++ b/debian-ssh.Containerfile @@ -0,0 +1,6 @@ +FROM docker.io/debian:stable +RUN mkdir /etc/ssh +COPY ssh-config/* /etc/ssh/ +RUN apt-get update && apt-get upgrade -y && apt-get install -y systemd kitty-terminfo openssh-server python3 && rm -rf /var/cache/apt/ && mkdir -m 0700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys && echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJKjThT/FYgychPF0LHvkaO/H1qPEQ9RXLzs6bmBtONu ben2019" >> ~/.ssh/authorized_keys + +ENTRYPOINT ["/sbin/init"] diff --git a/inventory b/inventory new file mode 100644 index 0000000..f33b9ed --- /dev/null +++ b/inventory @@ -0,0 +1,2 @@ +[matrix] +test ansible_host=::1 ansible_port=2222 ansible_user=root diff --git a/ssh-config/.gitkeep b/ssh-config/.gitkeep new file mode 100644 index 0000000..e69de29