mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Add nsenter details to libcontainer README.md
Add the import of nsenter to the example in libcontainer's README.md, as without it none of the example code works. Signed-off-by: Steven Hartland <steven.hartland@multiplay.co.uk>
This commit is contained in:
@@ -16,7 +16,14 @@ the current binary (/proc/self/exe) to be executed as the init process, and use
|
|||||||
arg "init", we call the first step process "bootstrap", so you always need a "init"
|
arg "init", we call the first step process "bootstrap", so you always need a "init"
|
||||||
function as the entry of "bootstrap".
|
function as the entry of "bootstrap".
|
||||||
|
|
||||||
|
In addition to the go init function the early stage bootstrap is handled by importing
|
||||||
|
[nsenter](https://github.com/opencontainers/runc/blob/master/libcontainer/nsenter/README.md).
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
import (
|
||||||
|
_ "github.com/opencontainers/runc/libcontainer/nsenter"
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if len(os.Args) > 1 && os.Args[1] == "init" {
|
if len(os.Args) > 1 && os.Args[1] == "init" {
|
||||||
runtime.GOMAXPROCS(1)
|
runtime.GOMAXPROCS(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user