Skip to content

Debian base system container image with Systemd and SSH

Notifications You must be signed in to change notification settings

veita/cont-debian-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debian Base System

Build a Debian base system container image with Systemd and SSH remote access using Podman/Buildah.

Containers based on this image can be used as lightweight replacements for virtual machines.

Run the image build

To build a Debian 12 Bookworm image run

./build-container.sh

To build an image with a specific Debian version (bullseye, bookworm, trixie) run

./build-container.sh bullseye

Without placing a root/.ssh/authorized_keys file in the project directory the build script configures the SSH daemon for root access with the password admin. Otherwise SSH root login using a password is prohibited and restriced to the given SSH keys.

Run the container

Run the container with sshd listening on port 10022 for remote connections.

podman run --rm --detach --cap-add audit_write,audit_control -p=10022:22 localhost/debian-systemd-bookworm

Connect per SSH (host keys are newly created at the first container start).

ssh -p 10022 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] 

Safety

Do not run setup.sh in your host system.

About

Debian base system container image with Systemd and SSH

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published