Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for in docker deployment before setting cgroup #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

J-Spark1
Copy link

Creating a docker container from the current master branch works, but when trying to run containernet within the docker container, it does not work, failing with the error

docker.errors.APIError: 400 Client Error: Bad Request ("cgroup-parent for systemd cgroup should be a valid slice named as "xxx.slice"")

The reason for this is the setting of cgroup_parent='/docker' when creating a new Docker Host.

The proposed changes check for the "CONTAINERNET_NESTED" environment variable and if it is set to 1. If true, cgroup_parent will be set to None, allowing execution in docker containers again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant