docker commit --change support

Replaces #8332 fixing an issue with returning a hard error when there is an invalid command for commit.


I don’t understand? An empty struct consumes zero bytes. Additionally, this is the pattern I will be using in other patches we have to introduce (and one we use elsewhere in the code), and I’d like to keep things consistent.



> On Oct 24, 2014, at 3:06 PM, Michael Crosby <notifications@github.com> wrote:
> 
> In builder/job.go:
> 
> >  	"github.com/docker/docker/utils"
> >  )
> >  
> > +// whitelist of commands allowed for a commit
> > +var validCommitCommands = map[string]bool{
> > +	"entrypoint": true,
> > +	"cmd":        true,
> > +	"user":       true,
> > +	"workdir":    true,
> > +	"env":        true,
> > +	"volume":     true,
> > +	"expose":     true,
> > +	"onbuild":    true,
> > +}
> > +
> a bool is smaller and we do use the value as non existent values eval to false because if _, ok := map["something"] { is not as clean as if map["something"] {
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/docker/docker/pull/8765/files#r19367477>.
>