*: purge dockerinit from source code
dockerinit has been around for a very long time. It was originally used as a way for us to do configuration for LXC containers once the container had started. LXC is no longer supported, and /.dockerinit has been dead code for quite a while. This removes all code and references in code to dockerinit. Signed-off-by: Aleksa Sarai <asarai@suse.com> Upstream-commit: 4357ed4a7363a1032edf93cf03232953c805184f Component: engine
This commit is contained in:
@@ -27,10 +27,10 @@ func (s *DockerSuite) TestDiffFilenameShownInOutput(c *check.C) {
|
||||
}
|
||||
|
||||
// test to ensure GH #3840 doesn't occur any more
|
||||
func (s *DockerSuite) TestDiffEnsureDockerinitFilesAreIgnored(c *check.C) {
|
||||
func (s *DockerSuite) TestDiffEnsureInitLayerFilesAreIgnored(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
// this is a list of files which shouldn't show up in `docker diff`
|
||||
dockerinitFiles := []string{"/etc/resolv.conf", "/etc/hostname", "/etc/hosts", "/.dockerinit", "/.dockerenv"}
|
||||
initLayerFiles := []string{"/etc/resolv.conf", "/etc/hostname", "/etc/hosts", "/.dockerenv"}
|
||||
containerCount := 5
|
||||
|
||||
// we might not run into this problem from the first run, so start a few containers
|
||||
@@ -41,7 +41,7 @@ func (s *DockerSuite) TestDiffEnsureDockerinitFilesAreIgnored(c *check.C) {
|
||||
cleanCID := strings.TrimSpace(out)
|
||||
out, _ = dockerCmd(c, "diff", cleanCID)
|
||||
|
||||
for _, filename := range dockerinitFiles {
|
||||
for _, filename := range initLayerFiles {
|
||||
c.Assert(out, checker.Not(checker.Contains), filename)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user