Add archlinux container

This commit is contained in:
Ben 2022-04-25 23:56:40 +02:00
parent 0c6cee81e0
commit 3a7bf71f13
Signed by: ben
GPG Key ID: 0F54A7ED232D3319
4 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,3 @@
# podman-ansible-host
Podman setup to have a ansible host as a container. Debian & systemd based.
Podman setup to have a ansible host as a container. Debian/Arch & systemd based.

5
arch-ssh.Containerfile Normal file
View File

@ -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"]

View File

@ -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 .

View File

@ -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