mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #3202 from jpoimboe/libvirt-prereq-env
dockerinit: propagate "container" env variable from lxc
This commit is contained in:
commit
5d81776714
2 changed files with 3 additions and 1 deletions
|
@ -586,7 +586,6 @@ func (container *Container) Start() (err error) {
|
|||
env := []string{
|
||||
"HOME=/",
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"container=lxc",
|
||||
"HOSTNAME=" + container.Config.Hostname,
|
||||
}
|
||||
|
||||
|
|
|
@ -191,6 +191,9 @@ func SysInit() {
|
|||
log.Fatalf("Unable to unmarshal environment variables: %v", err)
|
||||
}
|
||||
|
||||
// Propagate the plugin-specific container env variable
|
||||
env = append(env, "container="+os.Getenv("container"))
|
||||
|
||||
args := &DockerInitArgs{
|
||||
user: *user,
|
||||
gateway: *gateway,
|
||||
|
|
Loading…
Add table
Reference in a new issue