Merge pull request #2853 from Igelko/patch-1
docker: If cmd and entrypoint not set, don't match them
This commit is contained in:
commit
dabf28edbe
1 changed files with 11 additions and 4 deletions
|
@ -1544,10 +1544,17 @@ class DockerManager(object):
|
|||
|
||||
image_matches = running_image in repo_tags
|
||||
|
||||
command_matches = command == details['Config']['Cmd']
|
||||
entrypoint_matches = (
|
||||
entrypoint == details['Config']['Entrypoint']
|
||||
)
|
||||
if command == None:
|
||||
command_matches = True
|
||||
else:
|
||||
command_matches = (command == details['Config']['Cmd'])
|
||||
|
||||
if entrypoint == None:
|
||||
entrypoint_matches = True
|
||||
else:
|
||||
entrypoint_matches = (
|
||||
entrypoint == details['Config']['Entrypoint']
|
||||
)
|
||||
|
||||
matches = (image_matches and command_matches and
|
||||
entrypoint_matches)
|
||||
|
|
Loading…
Add table
Reference in a new issue