Does libcontainer have a Python binding?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I need to work with containers that are created and operated through runc and thus libcontainer. These containers are not Docker containers. These containers are not visible to Docker, and are also not visible to the lxc tools and cannot be accessed via the lxc Python package.



Does libcontainer have Python bindings, preferably for Python3?



For instance, at the moment I'm spawning runc list -f json and then parse the resulting JSON answer. I would like to avoid having to rely on the runc cli tool, but instead directly use libcontainer. How could this be achieved, if possible at all?







share|improve this question



















  • Doesn't look like it... libcontainer is a Go library and it doesn't seem to have any bindings to any other languages. Furthermore, most of what runc list does is not really exposed by libcontainer, it only uses some shallow helpers from that library... You should probably just spawn runc using Python's subprocess and parse the resulting JSON with a json module.
    – Filipe Brandenburger
    May 9 at 21:06














up vote
0
down vote

favorite












I need to work with containers that are created and operated through runc and thus libcontainer. These containers are not Docker containers. These containers are not visible to Docker, and are also not visible to the lxc tools and cannot be accessed via the lxc Python package.



Does libcontainer have Python bindings, preferably for Python3?



For instance, at the moment I'm spawning runc list -f json and then parse the resulting JSON answer. I would like to avoid having to rely on the runc cli tool, but instead directly use libcontainer. How could this be achieved, if possible at all?







share|improve this question



















  • Doesn't look like it... libcontainer is a Go library and it doesn't seem to have any bindings to any other languages. Furthermore, most of what runc list does is not really exposed by libcontainer, it only uses some shallow helpers from that library... You should probably just spawn runc using Python's subprocess and parse the resulting JSON with a json module.
    – Filipe Brandenburger
    May 9 at 21:06












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to work with containers that are created and operated through runc and thus libcontainer. These containers are not Docker containers. These containers are not visible to Docker, and are also not visible to the lxc tools and cannot be accessed via the lxc Python package.



Does libcontainer have Python bindings, preferably for Python3?



For instance, at the moment I'm spawning runc list -f json and then parse the resulting JSON answer. I would like to avoid having to rely on the runc cli tool, but instead directly use libcontainer. How could this be achieved, if possible at all?







share|improve this question











I need to work with containers that are created and operated through runc and thus libcontainer. These containers are not Docker containers. These containers are not visible to Docker, and are also not visible to the lxc tools and cannot be accessed via the lxc Python package.



Does libcontainer have Python bindings, preferably for Python3?



For instance, at the moment I'm spawning runc list -f json and then parse the resulting JSON answer. I would like to avoid having to rely on the runc cli tool, but instead directly use libcontainer. How could this be achieved, if possible at all?









share|improve this question










share|improve this question




share|improve this question









asked May 9 at 19:59









TheDiveO

22310




22310











  • Doesn't look like it... libcontainer is a Go library and it doesn't seem to have any bindings to any other languages. Furthermore, most of what runc list does is not really exposed by libcontainer, it only uses some shallow helpers from that library... You should probably just spawn runc using Python's subprocess and parse the resulting JSON with a json module.
    – Filipe Brandenburger
    May 9 at 21:06
















  • Doesn't look like it... libcontainer is a Go library and it doesn't seem to have any bindings to any other languages. Furthermore, most of what runc list does is not really exposed by libcontainer, it only uses some shallow helpers from that library... You should probably just spawn runc using Python's subprocess and parse the resulting JSON with a json module.
    – Filipe Brandenburger
    May 9 at 21:06















Doesn't look like it... libcontainer is a Go library and it doesn't seem to have any bindings to any other languages. Furthermore, most of what runc list does is not really exposed by libcontainer, it only uses some shallow helpers from that library... You should probably just spawn runc using Python's subprocess and parse the resulting JSON with a json module.
– Filipe Brandenburger
May 9 at 21:06




Doesn't look like it... libcontainer is a Go library and it doesn't seem to have any bindings to any other languages. Furthermore, most of what runc list does is not really exposed by libcontainer, it only uses some shallow helpers from that library... You should probably just spawn runc using Python's subprocess and parse the resulting JSON with a json module.
– Filipe Brandenburger
May 9 at 21:06















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442852%2fdoes-libcontainer-have-a-python-binding%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442852%2fdoes-libcontainer-have-a-python-binding%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)