Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.42 KB

README.md

File metadata and controls

52 lines (36 loc) · 1.42 KB

Fedora systemd Codespaces

Run Fedora with systemd as a GitHub Codespaces

Note

This image is based on my gbraad-devenv/fedora image, and is therefore personalized; it uses gbraad as user with my dotfiles and tailored to use services exposed by my homelab setup. The Containerfile has /sbin/init as entrypoint after setting USER root.

Try it out

Open in GitHub Codespaces

Summarized

The following is a short overview of what is necessary to make this work.

/.devcontainer/Containerfile

ARG BASE_VERSION="41"

FROM quay.io/fedora/fedora:${BASE_VERSION}

LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora"

USER root

RUN dnf install -y \
        systemd sudo git-core \
    && dnf clean all \
    && rm -rf /var/cache/yum

ENTRYPOINT ["/sbin/init"]

/.devcontainer/devcontainer.json

{
    "name": "Fedora with systemd on Codespaces",
    "build": {
        "dockerfile": "Containerfile"
    },
    "overrideCommand": false,
    "privileged": true
}

Screenshot

"A codespace running Fedora with systemd"