@@ -1040,7 +1040,7 @@ def container_to_args(compose, cnt, detached=True):
1040
1040
if is_str (healthcheck_test ):
1041
1041
# podman does not add shell to handle command with whitespace
1042
1042
podman_args .extend (
1043
- ["--healthcheck-command " , "/bin/sh -c " + cmd_quote (healthcheck_test )]
1043
+ ["--health-cmd " , "/bin/sh -c " + cmd_quote (healthcheck_test )]
1044
1044
)
1045
1045
elif is_list (healthcheck_test ):
1046
1046
healthcheck_test = healthcheck_test .copy ()
@@ -1050,12 +1050,12 @@ def container_to_args(compose, cnt, detached=True):
1050
1050
podman_args .append ("--no-healthcheck" )
1051
1051
elif healthcheck_type == "CMD" :
1052
1052
cmd_q = "' '" .join ([cmd_quote (i ) for i in healthcheck_test ])
1053
- podman_args .extend (["--healthcheck-command " , "/bin/sh -c " + cmd_q ])
1053
+ podman_args .extend (["--health-cmd " , "/bin/sh -c " + cmd_q ])
1054
1054
elif healthcheck_type == "CMD-SHELL" :
1055
1055
if len (healthcheck_test ) != 1 :
1056
1056
raise ValueError ("'CMD_SHELL' takes a single string after it" )
1057
1057
cmd_q = cmd_quote (healthcheck_test [0 ])
1058
- podman_args .extend (["--healthcheck-command " , "/bin/sh -c " + cmd_q ])
1058
+ podman_args .extend (["--health-cmd " , "/bin/sh -c " + cmd_q ])
1059
1059
else :
1060
1060
raise ValueError (
1061
1061
f"unknown healthcheck test type [{ healthcheck_type } ],\
@@ -1066,15 +1066,15 @@ def container_to_args(compose, cnt, detached=True):
1066
1066
1067
1067
# interval, timeout and start_period are specified as durations.
1068
1068
if "interval" in healthcheck :
1069
- podman_args .extend (["--healthcheck -interval" , healthcheck ["interval" ]])
1069
+ podman_args .extend (["--health -interval" , healthcheck ["interval" ]])
1070
1070
if "timeout" in healthcheck :
1071
- podman_args .extend (["--healthcheck -timeout" , healthcheck ["timeout" ]])
1071
+ podman_args .extend (["--health -timeout" , healthcheck ["timeout" ]])
1072
1072
if "start_period" in healthcheck :
1073
- podman_args .extend (["--healthcheck -start-period" , healthcheck ["start_period" ]])
1073
+ podman_args .extend (["--health -start-period" , healthcheck ["start_period" ]])
1074
1074
1075
1075
# convert other parameters to string
1076
1076
if "retries" in healthcheck :
1077
- podman_args .extend (["--healthcheck -retries" , str (healthcheck ["retries" ])])
1077
+ podman_args .extend (["--health -retries" , str (healthcheck ["retries" ])])
1078
1078
1079
1079
# handle podman extension
1080
1080
x_podman = cnt .get ("x-podman" , None )
0 commit comments