:type tls_ca_cert: str :param tls_client_cert: Path to the PEM-encoded certificate used to authenticate docker client. :type mem_limit: float or str :param tls_ca_cert: Path to a PEM-encoded certificate authority to secure the docker connection. Either a float value, which represents the limit in bytes, or a string like ``128m`` or ``1g``. :type force_pull: bool :param mem_limit: Maximum amount of memory the container can use. (templated) :type environment: dict :param force_pull: Pull the docker image on every run. Default is unix://var/run/docker.sock :type docker_url: str :param environment: Environment variables to set in the container. (templated) :type command: str or list :param docker_url: URL of the host running the docker daemon. :type auto_remove: bool :param command: Command to be run in the container. :type api_version: str :param auto_remove: Auto-removal of the container on daemon side when the container's process exits. Set to ``auto`` to automatically detect the server's version. :type image: str :param api_version: Remote API version. If image tag is omitted, "latest" will be used. :param image: Docker image from which to create the container. If a login to a private registry is required prior to pulling the image, a Docker connection needs to be configured in Airflow and the connection ID be provided with the parameter ``docker_conn_id``. The path to the mounted directory can be accessed via the environment variable ``AIRFLOW_TMP_DIR``. A temporary directory is created on the host and mounted into a container to allow storing files that together exceed the default disk size of 10GB in a container. Example use-case - Using Docker Swarm orchestration to make one-time scripts highly available. class DockerSwarmOperator ( DockerOperator ): """ Execute a command as an ephemeral docker swarm service. """Run ephemeral Docker Swarm services""" from typing import TYPE_CHECKING, List, Optional, Union from docker import types from airflow.exceptions import AirflowException from .docker import DockerOperator from import get_random_string if TYPE_CHECKING : from import Context See the License for the # specific language governing permissions and limitations # under the License. You may obtain a copy of the License at # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License") you may not use this file except in compliance # with the License. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |