Fix issue EXPOSE override CMD within builder
This commit is contained in:
parent
31d2b258c1
commit
eaa2183d77
1 changed files with 2 additions and 0 deletions
|
@ -288,7 +288,9 @@ func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
|
||||||
}
|
}
|
||||||
b.config.Image = b.image
|
b.config.Image = b.image
|
||||||
if id == "" {
|
if id == "" {
|
||||||
|
cmd := b.config.Cmd
|
||||||
b.config.Cmd = []string{"/bin/sh", "-c", "#(nop) " + comment}
|
b.config.Cmd = []string{"/bin/sh", "-c", "#(nop) " + comment}
|
||||||
|
defer func(cmd []string) { b.config.Cmd = cmd }(cmd)
|
||||||
|
|
||||||
if cache, err := b.srv.ImageGetCached(b.image, b.config); err != nil {
|
if cache, err := b.srv.ImageGetCached(b.image, b.config); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Add table
Reference in a new issue