You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/04/06 00:00:46 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #5049: [AIRFLOW-3063] - Make DockerOperator support all docker arguments

mik-laj commented on a change in pull request #5049: [AIRFLOW-3063] - Make DockerOperator support all docker arguments
URL: https://github.com/apache/airflow/pull/5049#discussion_r272773305
 
 

 ##########
 File path: airflow/operators/docker_operator.py
 ##########
 @@ -93,86 +72,128 @@ class DockerOperator(BaseOperator):
         The path is also made available via the environment variable
         ``AIRFLOW_TMP_DIR`` inside the container.
     :type tmp_dir: str
-    :param user: Default user inside the docker container.
-    :type user: int or str
-    :param volumes: List of volumes to mount into the container, e.g.
-        ``['/host/path:/container/path', '/host/path2:/container/path2:ro']``.
-    :param working_dir: Working directory to
-        set on the container (equivalent to the -w switch the docker client)
-    :type working_dir: str
+    :param xcom_push: Does the stdout will be pushed to the next step using XCom.
+        The default is False.
+    :type xcom_push: bool
     :param xcom_all: Push all the stdout or just the last line.
         The default is False (last line).
     :type xcom_all: bool
     :param docker_conn_id: ID of the Airflow connection to use
     :type docker_conn_id: str
-    :param shm_size: Size of ``/dev/shm`` in bytes. The size must be
-        greater than 0. If omitted uses system default.
-    :type shm_size: int
+    :param container_config: a json that define all the config of the container .
+    :type container_config: json object
+        ** Use of container_config**
+        Takes a json object only, you can provide all the supported arguments in
+        create_container method. Check create_container method documentation for
+        more details: https://goo.gl/u5PQqE
+        Note: the image ``image`` attribute is mandatory.
+
+        .. code-block:: python
+
+            container_config = {'image':'ubuntu:latest',
+                                'command': 'echo hello world!'
+                                'environment':{'SOME_ENV_VAR':'SOME_VALUE'},
+                                'working_dir':'/container/some_path'
+            }
+    :param host_config: a json that define all host config of the container
+    :type host_config: json object
+        **Use of host_config**
+        Takes a json object only, you can provide all the supported arguments in
+        create_host_config method. Check create_host_config method documentation for
+        more details: https://goo.gl/65NcDi
 
 Review comment:
   Can you use the full address?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services