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: int
      start_period:
        description:
          - Start period for the container to initialize before starting health-retries countdown.
          - The default used by the Docker daemon is C(0s).
        type: str
    version_added: "2.8"
  hostname:
    description:
      - The container's hostname.
    type: str
  ignore_image:
    description:
      - When I(state) is C(present) or C(started), the module compares the configuration of an existing
        container to requested configuration. The evaluation includes the image version. If the image
        version in the registry does not match the container, the container will be recreated. You can
        stop this behavior by setting I(ignore_image) to C(True).
      - "*Warning:* This option is ignored if C(image: ignore) or C(*: ignore) is specified in the
        I(comparisons) option."
    type: bool
    default: no
    version_added: "2.2"
  image:
    description:
      - Repository path and tag used to create the container. If an image is not found or pull is true, the image
        will be pulled from the registry. If no tag is included, C(latest) will be used.
      - Can also be an image ID. If this is the case, the image is assumed to be available locally.
        The I(pull) option is ignored for this case.
    type: str
  init: