Usage


Using systemd-docker is straightforward once you understand its purpose: acting as a wrapper that makes Docker containers behave like proper systemd services. Instead of calling docker run directly in your unit files, you let systemd-docker handle the integration.

In this section, we’ll walk through how to use it in a systemd unit file, explain common options, and show real-world examples from production setups.


Getting systemd-docker

Getting started with systemd-docker is easy – no build steps, no complex setup.

Command-Line Options

systemd-docker provides a few simple but powerful flags to control its behavior. These options let you fine-tune how it integrates with systemd and the container.

Using systemd-docker in a systemd unit file

To fully integrate a Docker container as a proper systemd service, you’ll want to use systemd-docker inside a unit file.