mirror of
https://github.com/docker/compose.git
synced 2025-07-12 16:24:32 +02:00
run: clean service command if entrypoint is overridden (#9836)
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
a95cc4074a
commit
279225896a
@ -112,6 +112,9 @@ func applyRunOptions(project *types.Project, service *types.ServiceConfig, opts
|
||||
}
|
||||
if opts.Entrypoint != nil {
|
||||
service.Entrypoint = opts.Entrypoint
|
||||
if len(opts.Command) == 0 {
|
||||
service.Command = []string{}
|
||||
}
|
||||
}
|
||||
if len(opts.Environment) > 0 {
|
||||
cmdEnv := types.NewMappingWithEquals(opts.Environment)
|
||||
|
Loading…
x
Reference in New Issue
Block a user