1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Merge pull request #27174 from duglin/Issue26027

Don't env-var evaluate labels from docker build cmd line
This commit is contained in:
Sebastiaan van Stijn
2016-10-14 20:57:41 -07:00
committed by GitHub
2 changed files with 14 additions and 1 deletions

View File

@ -6632,6 +6632,19 @@ func (s *DockerSuite) TestBuildLabelsOverride(c *check.C) {
c.Fatalf("Labels %s, expected %s", res, expected)
}
// Command line option labels with env var
name = "scratchz"
expected = `{"bar":"$PATH"}`
_, err = buildImage(name,
`FROM scratch`,
true, "--label", "bar=$PATH")
c.Assert(err, check.IsNil)
res = inspectFieldJSON(c, name, "Config.Labels")
if res != expected {
c.Fatalf("Labels %s, expected %s", res, expected)
}
}
// Test case for #22855