Why DockerOperator have exit status 1?

  airflow, docker, dockeroperator

When running command docker run -v AirflowData:/data ds-model:0.0.1-1 python src/FetchTestUsers.py from terminal exit status is 0, but when I try to run command from a DockerOperator exit status is 1.

task_1=DockerOperator(
        task_id='docker_task',
        image='ds-model:0.0.1-1',
        command='python3 src/FetchTestUsers.py',
        volumes=['AirflowData:/data'],
        docker_url="unix://var/run/docker.sock",
        network_mode="bridge"
    )

Any idea how can I fix this?

Source: Docker Questions

LEAVE A COMMENT