airflow.providers.docker.hooks.docker¶
Classes¶
Interact with a Docker Daemon and Container Registry. |
Module Contents¶
- class airflow.providers.docker.hooks.docker.DockerHook(docker_conn_id=default_conn_name, base_url=None, version=None, tls=None, timeout=DEFAULT_TIMEOUT_SECONDS)[source]¶
Bases:
airflow.providers.common.compat.sdk.BaseHookInteract with a Docker Daemon and Container Registry.
This class provide a thin wrapper around the
docker.APIClient.- Parameters:
docker_conn_id (str | None) – Docker connection id where stored credentials to Docker Registry. If set to
Noneor empty then hook does not login to Container Registry.base_url (str | list[str] | None) – URL or list of URLs to the Docker server.
version (str | None) – The version of the API to use. Use
autoorNonefor automatically detect the server’s version.tls (docker.TLSConfig | bool | None) – Is connection required TLS, for enable pass
Truefor use with default options, or pass a docker.tls.TLSConfig object to use custom configurations.timeout (int) – Default timeout for API calls, in seconds.
- static construct_tls_config(ca_cert=None, client_cert=None, client_key=None, verify=True, assert_hostname=None, ssl_version=None)[source]¶
Construct TLSConfig object from parts.
- Parameters:
ca_cert (str | None) – Path to a PEM-encoded CA (Certificate Authority) certificate file.
client_cert (str | None) – Path to PEM-encoded certificate file.
client_key (str | None) – Path to PEM-encoded key file.
verify (bool) – Set
Trueto verify the validity of the provided certificate.assert_hostname (str | bool | None) – Hostname to match against the docker server certificate or
Falseto disable the check.ssl_version (str | None) – Version of SSL to use when communicating with docker daemon.