From 6e2662b3bad319679e17fe25d410f246820ab0e9 Mon Sep 17 00:00:00 2001 From: Tom Howe Date: Thu, 4 Jun 2015 08:47:55 -0500 Subject: [PATCH] just adding label to whitelist for commit command (Fixes #13738) Signed-off-by: Tom Howe --- builder/job.go | 2 ++ integration-cli/docker_cli_commit_test.go | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/builder/job.go b/builder/job.go index b24d8e16df..b15aaab47a 100644 --- a/builder/job.go +++ b/builder/job.go @@ -34,6 +34,8 @@ var validCommitCommands = map[string]bool{ "volume": true, "expose": true, "onbuild": true, + "label": true, + "maintainer": true, } type Config struct { diff --git a/integration-cli/docker_cli_commit_test.go b/integration-cli/docker_cli_commit_test.go index ef157c63f8..aa77cacddf 100644 --- a/integration-cli/docker_cli_commit_test.go +++ b/integration-cli/docker_cli_commit_test.go @@ -223,6 +223,13 @@ func (s *DockerSuite) TestCommitChange(c *check.C) { "--change", "ENV DEBUG true", "--change", "ENV test 1", "--change", "ENV PATH /foo", + "--change", "LABEL foo bar", + "--change", "CMD [\"/bin/sh\"]", + "--change", "WORKDIR /opt", + "--change", "ENTRYPOINT [\"/bin/sh\"]", + "--change", "USER testuser", + "--change", "VOLUME /var/lib/docker", + "--change", "ONBUILD /usr/local/bin/python-build --dir /app/src", "test", "test-commit") imageId, _, err := runCommandWithOutput(cmd) if err != nil { @@ -233,6 +240,13 @@ func (s *DockerSuite) TestCommitChange(c *check.C) { expected := map[string]string{ "Config.ExposedPorts": "map[8080/tcp:{}]", "Config.Env": "[DEBUG=true test=1 PATH=/foo]", + "Config.Labels": "map[foo:bar]", + "Config.Cmd": "{[/bin/sh]}", + "Config.WorkingDir": "/opt", + "Config.Entrypoint": "{[/bin/sh]}", + "Config.User": "testuser", + "Config.Volumes": "map[/var/lib/docker:{}]", + "Config.OnBuild": "[/usr/local/bin/python-build --dir /app/src]", } for conf, value := range expected {