{"id":13903243,"url":"https://github.com/mikhailnov/snr","last_synced_at":"2025-07-18T00:33:49.029Z","repository":{"id":125183603,"uuid":"190992309","full_name":"mikhailnov/snr","owner":"mikhailnov","description":"Simple wrapper to quickly run systemd-nspawn containers with support to run graphical applications inside container and full access to videocard and working sound input/output.","archived":false,"fork":false,"pushed_at":"2023-01-25T11:42:38.000Z","size":41,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-07T22:37:09.099Z","etag":null,"topics":["container-management","containerization","containers","systemd-nspawn"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikhailnov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-09T10:21:03.000Z","updated_at":"2024-07-29T13:33:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c0f12c9-1318-4a1c-9634-c63d97c788ab","html_url":"https://github.com/mikhailnov/snr","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailnov%2Fsnr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailnov%2Fsnr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailnov%2Fsnr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikhailnov%2Fsnr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikhailnov","download_url":"https://codeload.github.com/mikhailnov/snr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226320960,"owners_count":17606381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container-management","containerization","containers","systemd-nspawn"],"created_at":"2024-08-06T22:01:54.357Z","updated_at":"2024-11-25T11:31:27.234Z","avatar_url":"https://github.com/mikhailnov.png","language":"Shell","funding_links":[],"categories":["containers"],"sub_categories":[],"readme":"# snr — systemd-nspawn runner\n\n## About snr\n\nSimple wrapper to quickly run systemd-nspawn containers with support to:\n\n* run graphical applications inside container\n* have full access to videocard\n* have working sound input and output\n* bind to network bridge\n* automatically set x86_32 \"personality\" when running 32 bit containers\n* specify any other options for systemd-nspawn\n* automatically uses `sudo` when being run not as root\n\n## CLI syntax\n\n`snr CONTAINER_NAME [additional CLI arguements passed directly to systemd-nspawn]`\n\n## Usage examples\n\nSome usage examples:\n\n* `snr rosa-2016.1`\n* `snr rosa-2016.1 -b`\n* `NW=0 rosa-2016.1 -b`\n* `NW=0 rosa-2016.1 --bind=/tmp/rosa`\n\n`-b` (or `--boot`) means booting the container, not just chrooting into it. All options are passed to `systemd-nspawn(1)` without changes.\n\nRun specific application, including graphical ones (`geany` as an example):\n\n* `snr rosa-2016.1 -q geany`\n* `snr rosa-2016.1 --bind=/tmp/rosa -q geany`\n* `snr rosa-2016.1 -q \"sudo -u user geany\"`\n* `snr rosa-2016.1 -q urpmi gedit`\n\nwhere `rosa-2016.1` is a directory inside `/var/lib/machines` or inside the current directory.\n\n## Options\n\nAll options can be set in `/etc/snr.conf` or `$PWD/snr.conf` or defined as environmental variables.\n\n* `DIR` — directory where to look for containers, `/var/lib/machines` by default\n* `NW` — reuse an existing network interface (usually a bridge)  \n  If livbirtd is running, it creates `virbr0` interface, which is used by virtual machines. It can be used also for containers to get IP addresses via DHCP from the same network.  \n  `NW=0` - disable binding to network bridge  \n  `NW=1` - enable binding to network bridge  \n  `NW=2` - force binding to network bridge even if not booting  \n  If the container is not being booted (`-b | --boot`) and `NW` is not defined or is 0 or is 1, then it is set to `0`.\n* `BRIDGE` — name of the network interface to use  \n  If not defined, `snr` tries to use the first `virbr*` interface.\n* `bind_options` — set a persistent list of mount-binded directories for `systemd-nspawn(1)`  \n  Examples:  \n  `--bind=/tmp/444` means \"make a directory `/tmp/444` inside the container and make `/tmp/444` from the host be it\"  \n  `--bind=/tmp/444:/root/444` means \"make a directory `/root/444` inside the container and make `/tmp/444` from the host be it\"  \n  `--bind=/tmp/444 --bind=/tmp/555:/root/555`\n* `other_options` — list of any other CLI options for `systemd-nspawn(1)` which are always passed to it  \n  When a container is run, options are appended in the following order:  \n  `[bind_options]` `[other_options]` `[everything from snr cli]`  \n\n## Feedback\n\nReport bugs and send feedback to issues at [https://github.com/mikhailnov/snr](https://github.com/mikhailnov/snr).\n\nFeel free to send pull requests or email patches to \u003cm@mikhailnov.ru\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikhailnov%2Fsnr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikhailnov%2Fsnr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikhailnov%2Fsnr/lists"}