Add Containerfile for the ansible host
This commit is contained in:
parent
1a6e612bb3
commit
0c6cee81e0
3
cnt-build.sh
Executable file
3
cnt-build.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
exec podman build --tag localhost/debian-ssh -f debian-ssh.Containerfile .
|
3
cnt-run.sh
Executable file
3
cnt-run.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
exec podman run --detach --replace --name debian-ssh --publish=\[::\]:2222:22 localhost/debian-ssh
|
6
debian-ssh.Containerfile
Normal file
6
debian-ssh.Containerfile
Normal file
|
@ -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"]
|
2
inventory
Normal file
2
inventory
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[matrix]
|
||||||
|
test ansible_host=::1 ansible_port=2222 ansible_user=root
|
0
ssh-config/.gitkeep
Normal file
0
ssh-config/.gitkeep
Normal file
Loading…
Reference in a new issue