|
@@ -104,7 +104,6 @@ func (s *DockerSuite) TestCommitWithHostBindMount(c *check.C) {
|
|
}
|
|
}
|
|
|
|
|
|
func (s *DockerSuite) TestCommitChange(c *check.C) {
|
|
func (s *DockerSuite) TestCommitChange(c *check.C) {
|
|
- testRequires(c, DaemonIsLinux)
|
|
|
|
dockerCmd(c, "run", "--name", "test", "busybox", "true")
|
|
dockerCmd(c, "run", "--name", "test", "busybox", "true")
|
|
|
|
|
|
imageID, _ := dockerCmd(c, "commit",
|
|
imageID, _ := dockerCmd(c, "commit",
|
|
@@ -122,12 +121,14 @@ func (s *DockerSuite) TestCommitChange(c *check.C) {
|
|
"test", "test-commit")
|
|
"test", "test-commit")
|
|
imageID = strings.TrimSpace(imageID)
|
|
imageID = strings.TrimSpace(imageID)
|
|
|
|
|
|
|
|
+ prefix, slash := getPrefixAndSlashFromDaemonPlatform()
|
|
|
|
+ prefix = strings.ToUpper(prefix) // Force C: as that's how WORKDIR is normalised on Windows
|
|
expected := map[string]string{
|
|
expected := map[string]string{
|
|
"Config.ExposedPorts": "map[8080/tcp:{}]",
|
|
"Config.ExposedPorts": "map[8080/tcp:{}]",
|
|
"Config.Env": "[DEBUG=true test=1 PATH=/foo]",
|
|
"Config.Env": "[DEBUG=true test=1 PATH=/foo]",
|
|
"Config.Labels": "map[foo:bar]",
|
|
"Config.Labels": "map[foo:bar]",
|
|
"Config.Cmd": "[/bin/sh]",
|
|
"Config.Cmd": "[/bin/sh]",
|
|
- "Config.WorkingDir": "/opt",
|
|
|
|
|
|
+ "Config.WorkingDir": prefix + slash + "opt",
|
|
"Config.Entrypoint": "[/bin/sh]",
|
|
"Config.Entrypoint": "[/bin/sh]",
|
|
"Config.User": "testuser",
|
|
"Config.User": "testuser",
|
|
"Config.Volumes": "map[/var/lib/docker:{}]",
|
|
"Config.Volumes": "map[/var/lib/docker:{}]",
|