Devcontainers provide preconfigured development environments so you can start coding right away without extra setup. This repository is an example of a lightweight devcontainer setup that boots with systemd as PID 1 — ideal for running or testing services that require a real init system.
Assuming you have VS Code and Docker installed you can click here to automaticaly:
- Install the Dev Containers extension if necessary
- Clone this repo into a container volume
- Start the dev container
- Install the code editor application VS Code
- Use the VS Code extensions tab to install the Dev Containers Extension.
- Install and configure Docker for your operating system:
- Windows & macOS: Install Docker Desktop for Mac/Windows.
- Linux: Install Docker CE/EE for Linux use
sudo usermod -aG docker $USERto authorize your user before logging out and back in.
# Clone the repository
git clone https://github.com/Chuxel/systemd-devcontainer.git
# Open the folder in VS Code
code systemd-devcontainer
# Press F1 and "Reopen In Container"Run the following inside the container to confirm systemd is PID 1
ps -p 1 -o comm=The MIT License lets you use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the project — for personal or commercial use. Just keep the original license text included. No warranties are provided.
Created by @Chuxel.
His work on this repo is simple and effective, as if crafted by a true wizard!
Please ⭐ star the repo to show your support. — README contributor @mcconnellj