diff --git a/README.md b/README.md index 4a71b2c..e856726 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # podman-ansible-host -Podman setup to have a ansible host as a container. Debian & systemd based. \ No newline at end of file +Podman setup to have a ansible host as a container. Debian/Arch & systemd based. diff --git a/arch-ssh.Containerfile b/arch-ssh.Containerfile new file mode 100644 index 0000000..bfcea46 --- /dev/null +++ b/arch-ssh.Containerfile @@ -0,0 +1,5 @@ +FROM docker.io/archlinux:base +RUN pacman -Syu --noconfirm systemd kitty-terminfo openssh python3 && rm -rf /var/cache/pacman/ && systemctl enable sshd.service && mkdir -m 0700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys && echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJKjThT/FYgychPF0LHvkaO/H1qPEQ9RXLzs6bmBtONu ben2019" >> ~/.ssh/authorized_keys +COPY ssh-config/* /etc/ssh/ + +ENTRYPOINT ["/sbin/init"] diff --git a/cnt-build.sh b/cnt-build.sh index b1e3e44..4417446 100755 --- a/cnt-build.sh +++ b/cnt-build.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh +podman build --tag localhost/arch-ssh -f arch-ssh.Containerfile . exec podman build --tag localhost/debian-ssh -f debian-ssh.Containerfile . diff --git a/cnt-run.sh b/cnt-run.sh index 1f69958..6c4c98f 100755 --- a/cnt-run.sh +++ b/cnt-run.sh @@ -1,3 +1,4 @@ #!/usr/bin/env sh +podman run --detach --replace --name arch-ssh --publish=\[::\]:2223:22 localhost/arch-ssh exec podman run --detach --replace --name debian-ssh --publish=\[::\]:2222:22 localhost/debian-ssh