Skip to content

Commit c86189d

Browse files
committed
Update libcontainer
Replaced github.com/docker/libcontainer with github.com/opencontainers/runc/libcontaier. Also I moved AppArmor profile generation to docker. Main idea of this update is to fix mounting cgroups inside containers. After updating docker on CI we can even remove dind. Signed-off-by: Alexander Morozov <lk4d4@docker.com>
1 parent 8801906 commit c86189d

File tree

156 files changed

+350
-1052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+350
-1052
lines changed

daemon/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"syscall"
1414
"time"
1515

16-
"github.com/docker/libcontainer/label"
16+
"github.com/opencontainers/runc/libcontainer/label"
1717

1818
"github.com/Sirupsen/logrus"
1919
"github.com/docker/docker/daemon/execdriver"

daemon/container_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ import (
2727
"github.com/docker/docker/pkg/ulimit"
2828
"github.com/docker/docker/runconfig"
2929
"github.com/docker/docker/utils"
30-
"github.com/docker/libcontainer/configs"
31-
"github.com/docker/libcontainer/devices"
3230
"github.com/docker/libnetwork"
3331
"github.com/docker/libnetwork/netlabel"
3432
"github.com/docker/libnetwork/options"
3533
"github.com/docker/libnetwork/types"
34+
"github.com/opencontainers/runc/libcontainer/configs"
35+
"github.com/opencontainers/runc/libcontainer/devices"
3636
)
3737

3838
const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

daemon/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/docker/docker/pkg/parsers"
1212
"github.com/docker/docker/pkg/stringid"
1313
"github.com/docker/docker/runconfig"
14-
"github.com/docker/libcontainer/label"
14+
"github.com/opencontainers/runc/libcontainer/label"
1515
)
1616

1717
func (daemon *Daemon) ContainerCreate(name string, config *runconfig.Config, hostConfig *runconfig.HostConfig) (string, []string, error) {

daemon/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ import (
3535
"github.com/docker/docker/registry"
3636
"github.com/docker/docker/runconfig"
3737
"github.com/docker/docker/trust"
38-
"github.com/docker/libcontainer/netlink"
3938
"github.com/docker/libnetwork"
39+
"github.com/opencontainers/runc/libcontainer/netlink"
4040
)
4141

4242
var (

daemon/daemon_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424
"github.com/docker/docker/utils"
2525
volumedrivers "github.com/docker/docker/volume/drivers"
2626
"github.com/docker/docker/volume/local"
27-
"github.com/docker/libcontainer/label"
2827
"github.com/docker/libnetwork"
2928
nwapi "github.com/docker/libnetwork/api"
3029
nwconfig "github.com/docker/libnetwork/config"
3130
"github.com/docker/libnetwork/netlabel"
3231
"github.com/docker/libnetwork/options"
32+
"github.com/opencontainers/runc/libcontainer/label"
3333
)
3434

3535
func (daemon *Daemon) Changes(container *Container) ([]archive.Change, error) {

daemon/execdriver/driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88

99
// TODO Windows: Factor out ulimit
1010
"github.com/docker/docker/pkg/ulimit"
11-
"github.com/docker/libcontainer"
12-
"github.com/docker/libcontainer/configs"
11+
"github.com/opencontainers/runc/libcontainer"
12+
"github.com/opencontainers/runc/libcontainer/configs"
1313
)
1414

1515
// Context is a generic key value pair that allows

daemon/execdriver/driver_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"time"
1111

1212
"github.com/docker/docker/daemon/execdriver/native/template"
13-
"github.com/docker/libcontainer"
14-
"github.com/docker/libcontainer/cgroups/fs"
15-
"github.com/docker/libcontainer/configs"
13+
"github.com/opencontainers/runc/libcontainer"
14+
"github.com/opencontainers/runc/libcontainer/cgroups/fs"
15+
"github.com/opencontainers/runc/libcontainer/configs"
1616
)
1717

1818
func InitContainer(c *Command) *configs.Config {

daemon/execdriver/lxc/driver.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ import (
2525
sysinfo "github.com/docker/docker/pkg/system"
2626
"github.com/docker/docker/pkg/term"
2727
"github.com/docker/docker/pkg/version"
28-
"github.com/docker/libcontainer"
29-
"github.com/docker/libcontainer/cgroups"
30-
"github.com/docker/libcontainer/configs"
31-
"github.com/docker/libcontainer/system"
32-
"github.com/docker/libcontainer/user"
3328
"github.com/kr/pty"
29+
"github.com/opencontainers/runc/libcontainer"
30+
"github.com/opencontainers/runc/libcontainer/cgroups"
31+
"github.com/opencontainers/runc/libcontainer/configs"
32+
"github.com/opencontainers/runc/libcontainer/system"
33+
"github.com/opencontainers/runc/libcontainer/user"
3434
"github.com/vishvananda/netns"
3535
)
3636

daemon/execdriver/lxc/lxc_init_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package lxc
55
import (
66
"fmt"
77

8-
"github.com/docker/libcontainer/utils"
8+
"github.com/opencontainers/runc/libcontainer/utils"
99
)
1010

1111
func finalizeNamespace(args *InitArgs) error {

daemon/execdriver/lxc/lxc_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/docker/docker/daemon/execdriver"
1313
nativeTemplate "github.com/docker/docker/daemon/execdriver/native/template"
1414
"github.com/docker/docker/pkg/stringutils"
15-
"github.com/docker/libcontainer/label"
15+
"github.com/opencontainers/runc/libcontainer/label"
1616
)
1717

1818
const LxcTemplate = `

0 commit comments

Comments
 (0)