mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Do not populate path to prevent runconfig merge conflict; remove
autoConfig seeding of entrypoint. Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
parent
78a847a47a
commit
92f885d7bd
2 changed files with 1 additions and 5 deletions
|
@ -144,7 +144,7 @@ func (b *Builder) Run(context io.Reader) (string, error) {
|
||||||
b.dockerfile = ast
|
b.dockerfile = ast
|
||||||
|
|
||||||
// some initializations that would not have been supplied by the caller.
|
// some initializations that would not have been supplied by the caller.
|
||||||
b.Config = &runconfig.Config{Entrypoint: []string{}, Cmd: []string{"/bin/sh", "-c"}, Env: []string{"PATH=" + daemon.DefaultPathEnv}}
|
b.Config = &runconfig.Config{Entrypoint: []string{}, Cmd: []string{"/bin/sh", "-c"}}
|
||||||
b.TmpContainers = map[string]struct{}{}
|
b.TmpContainers = map[string]struct{}{}
|
||||||
|
|
||||||
for i, n := range b.dockerfile.Children {
|
for i, n := range b.dockerfile.Children {
|
||||||
|
|
|
@ -90,10 +90,6 @@ func (b *Builder) commit(id string, autoCmd []string, comment string) error {
|
||||||
autoConfig := *b.Config
|
autoConfig := *b.Config
|
||||||
autoConfig.Cmd = autoCmd
|
autoConfig.Cmd = autoCmd
|
||||||
|
|
||||||
if autoConfig.Entrypoint == nil {
|
|
||||||
autoConfig.Entrypoint = []string{"/bin/sh", "-c"}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Commit the container
|
// Commit the container
|
||||||
image, err := b.Daemon.Commit(container, "", "", "", b.maintainer, true, &autoConfig)
|
image, err := b.Daemon.Commit(container, "", "", "", b.maintainer, true, &autoConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue