mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #1682] [CLOSED] Draft: LXC support for self-hosted runners #2068
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#2068
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/1682
Author: @earl-warren
Created: 3/16/2023
Status: ❌ Closed
Base:
master← Head:wip-github-lxc📝 Commits (6)
c7f0532add stopHostEnvironment to tear down the LXC container9c95665shell script to start the LXC container3ee8456create and destroy a LXC containerfbad698run commands with lxc-attach643a462expose additional devices for docker & libvirt to work2ccb312install node 16 & git for checkout to work📊 Changes
4 files changed (+186 additions, -9 deletions)
View changed files
📝
pkg/container/executions_environment.go(+2 -0)📝
pkg/container/host_environment.go(+24 -5)📝
pkg/container/linux_container_environment_extensions.go(+9 -2)📝
pkg/runner/run_context.go(+151 -2)📄 Description
Description
The LXC support for self-hosted runners is used to run tests that do not fit the constraints imposed by the docker backend such as having a systemd capable environment.
It creates a container from scratch on every run. If the tests accidentally damage essential services such as the ssh server, it will not have any impact on the host running the LXC container. If the same accident happens without the isolation provided by the LXC container, the host itself will be damaged. The LXC support provides a robust isolation for each job in the workflows, which the self-hosted platform does not.
Implementation details
It is roughly the equivalent of doing the following:
This is inherently insecure, in the same way the self-hosted platform is. Hardening LXC containers is possible but it makes them no more useful than docker containers.
FAQ
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.