As per the docs the following should override the image defined health check. But it fails to override the image defined health check. This is important where the image defined health check is not applicable. One such example is using the creating a MySQL cluster in that the default health check is against mysqld which is not appropriate because either ndbd or ndb_mgmd is appropriate.

This leaves the container marked as unhealthy.

Using;

healthcheck:
  test: ["NONE"]

If you use the above to launch MySQL the default health check is used, inspect output following.

            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "/healthcheck.sh"
                ]
            },

Resulting in;

21b30279e77d        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh mysq…"   3 minutes ago       Up 2 minutes (healthy)     1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql
0fb50981bba5        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh ndbd"    3 minutes ago       Up 3 minutes (unhealthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql-ndbd-2
8746135e3f8e        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh ndbd"    3 minutes ago       Up 3 minutes (unhealthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql-ndbd-1
420fb8249df8        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh ndb_…"   3 minutes ago       Up 3 minutes (healthy)     1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql-mgmd

The work around is to call a stub shell which simply calls exit 0.

    healthcheck:
      test: ["CMD-SHELL", "{{ mysql_config_directory }}/healthcheck.sh"]

Resulting in;

            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "/etc/cell/dev/mysql/healthcheck.sh"
                ]
            },
 And;

aaf28f87abf0        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh mysq…"   3 minutes ago       Up 3 minutes (healthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql
2df7948c37fc        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh ndbd"    3 minutes ago       Up 3 minutes (healthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql-ndbd-2
1a3cd97cfc80        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh ndbd"    3 minutes ago       Up 3 minutes (healthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql-ndbd-1
5fea532ef20f        mysql/mysql-cluster:8.0.18                          "/entrypoint.sh ndb_…"   3 minutes ago       Up 3 minutes (healthy)   1186/tcp, 2202/tcp, 3306/tcp, 33060/tcp                                  dev-mysql-mgmd

type: bool
  pid_mode:
    description:
      - Set the PID namespace mode for the container.
      - Note that Docker SDK for Python < 2.0 only supports C(host). Newer versions of the
        Docker SDK for Python (docker) allow all values supported by the Docker daemon.
    type: str
  pids_limit:
    description:
      - Set PIDs limit for the container. It accepts an integer value.
      - Set C(-1) for unlimited PIDs.
    type: int
    version_added: "2.8"
  privileged:
    description:
      - Give extended privileges to the container.
      - If I(container_default_behavior) is set to C(compatiblity) (the default value), this
        option has a default of C(no).
    type: bool
  published_ports:
    description:
      - List of ports to publish from the container to the host.
      - "Use docker CLI syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000), where 8000 is a
        container port, 9000 is a host port, and 0.0.0.0 is a host interface."
      - Port ranges can be used for source and destination ports. If two ranges with
        different lengths are specified, the shorter range will be used.
      - "Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are *not* allowed. This
        is different from the C(docker) command line utility. Use the L(dig lookup,../lookup/dig.html)
        to resolve hostnames."
      - A value of C(all) will publish all exposed container ports to random host ports, ignoring