Use as the FROM base in your Dockerfile to get correct process management and syslog without any extra configuration.
Run multiple background services inside one container with automatic restart on crash using the runit supervisor.
Enable the optional SSH server to log into a running container for debugging without needing docker exec.
When you run Ubuntu inside a Docker container, things break in subtle ways. Ubuntu was built for real machines or virtual servers, not containers. Its normal startup system expects hardware that is not there, and as a result containers accumulate stuck processes over time, logging stops working properly, and shutting down the container can corrupt files rather than close them cleanly. Baseimage-docker is a pre-built Docker image that fixes all of these problems before you write a single line of code. The image is built on Ubuntu 24.04 and weighs about 8.3 MB of RAM at runtime. It adds a custom startup program called my_init that correctly handles the Unix process lifecycle inside a container, meaning it adopts any orphaned child processes and cleans them up properly. It also replaces Ubuntu's default service manager with runit, a lightweight tool that can supervise multiple services and automatically restart them if they crash. Together these two pieces let you run more than one background program inside a single container without fighting the Docker model. Other additions include a syslog daemon so that the kernel and system tools can log messages normally, a cron scheduler for scheduled tasks, log rotation, and an optional SSH server (off by default) for logging into a running container to inspect what is happening. There is also a small utility called setuser that lets you run a command as a specific system user without elevated privileges. The practical benefit is that you can use baseimage-docker as the FROM line in your own Dockerfile instead of the stock Ubuntu image, and all of the corner-case configuration work is already done. You can focus on installing your application rather than patching the operating system to behave correctly in a container. The project documentation walks through adding your own services, passing environment variables in, enabling SSH, and building the image yourself if you need custom modifications. The full README is longer than what was shown.
← phusion on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.