{"id":19980460,"url":"https://github.com/lkiesow/setup-lxc-container","last_synced_at":"2025-05-04T05:31:59.476Z","repository":{"id":66226165,"uuid":"603746202","full_name":"lkiesow/setup-lxc-container","owner":"lkiesow","description":"Setup an LXC Container on GitHub Actions","archived":false,"fork":false,"pushed_at":"2025-05-01T18:53:40.000Z","size":2163,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-01T19:42:06.483Z","etag":null,"topics":["actions","containers","hacktoberfest","infrastructure","testing","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkiesow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-19T13:09:24.000Z","updated_at":"2025-05-01T18:52:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"37da686b-d44c-470f-8e53-28985a199137","html_url":"https://github.com/lkiesow/setup-lxc-container","commit_stats":{"total_commits":152,"total_committers":2,"mean_commits":76.0,"dds":0.4144736842105263,"last_synced_commit":"2f816eab51eb3cb7737b01aae5b396c65abb1a4a"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiesow%2Fsetup-lxc-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiesow%2Fsetup-lxc-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiesow%2Fsetup-lxc-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiesow%2Fsetup-lxc-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkiesow","download_url":"https://codeload.github.com/lkiesow/setup-lxc-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252293082,"owners_count":21724960,"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":["actions","containers","hacktoberfest","infrastructure","testing","virtual-machine"],"created_at":"2024-11-13T03:43:40.996Z","updated_at":"2025-05-04T05:31:59.011Z","avatar_url":"https://github.com/lkiesow.png","language":"TypeScript","readme":"# GitHub Actions to Setup an LXC Container\n\nThis actions will create a fresh LXC container on GitHub actions you can then work with.\nIt provide a clean, virtual machine like environment with an init system\nbased on many different Linux distributions to choose from.\n\nFor example, this is a great way to test Ansible roles or playbooks.\n\n\n## Usage\n\n\n```yaml\n- uses: lkiesow/setup-lxc-container@v1\n  with:\n    # LXC distribution to use\n    # Default: centos\n    dist: centos\n\n    # Distribution release to use\n    # Default: 9-Stream\n    release: 9-Stream\n\n    # LXC container name.\n    # Will also be used as hostname in /etc/hosts if configure-etc-hosts is set.\n    # Default: test\n    name: test\n\n    # If to configure the container name and IP address in /etc/hosts.\n    # This allows you to address the container by name when using network\n    # commands like `ping test`.\n    # This is required for the automatic SSH configuration and disavling this\n    # will automatically disable `configure-ssh`.\n    # Default: true\n    configure-etc-hosts: true\n\n    # If to configure SSH. If enabled, this will:\n    # - Generate an SSH key on the host\n    # - Set the key as authorized key in the container\n    # - Set `lxc-init` to automatically install and enable `openssh-server` for\n    #   supported distributions\n    # - Import container SSH server keys\n    # Default: true\n    configure-ssh: true\n\n    # If to set `lxc-init` to automatically install Python on supported\n    # distributions.\n    # Default: true\n    python: true\n\n    # Commands to use for setting up the container (e.g. configure SSH).\n    # Setting this will overwrite in-container openssh-server and python\n    # installation for supported distributions. If you set this and have\n    # `configure-ssh` enabled, make sure to set up an SSH server.\n    #lxc-init:\n```\n\n## Example Workflow\n\nA simple workflow to set up a container,\nget the container's IP address\nand run a command in the container via `ssh`:\n\n```yaml\nname: Test\non:\n  push:\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: lkiesow/setup-lxc-container@v1\n        id: lxc\n        with:\n          dist: debian\n          release: bullseye\n\n      - name: IP address\n        run: |\n          echo 'Container IP address: ${{ steps.lxc.outputs.ip }}'\n\n      - name: Test SSH\n        run: |\n          ssh test echo success\n```\n\n\n## Docker Incompatibility\n\nThis action is incompatible with using Docker on GitHub Actions.\nThe action will disable the docker service.\nDo not try using LXC and Docker in one job.\n\n\n## Automatic SSH Server Setup\n\nThe action contains instructions to automatically install and enable an OpenSSH\nserver on several distributions. Use the `lxc-init` option to overwrite the\nsetup steps or to set up an OpenSSH server on non-supported distributions.\n\nSupported are recent versions of:\n\n- almalinux\n- centos\n- debian\n- fedora\n- rockylinux\n- ubuntu\n\n\n## Automatic Python Installation\n\nThe action contains instructions to automatically install Python on several\ndistributions if you do not use `lxc-init`. Supported are recent versions of:\n\n- almalinux\n- centos\n- debian\n- fedora\n- rockylinux\n- ubuntu\n\n\n## Supported Distributions\n\nTo get the full list of available distribution and release templates,\ninstall LXC and run:\n\n```\n❯ apt install lxc\n❯ lxc-create --template download --name tmp\n❯ lxc-destroy --name tmp\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkiesow%2Fsetup-lxc-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkiesow%2Fsetup-lxc-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkiesow%2Fsetup-lxc-container/lists"}