Jawaad Mahmood
01/12/2022, 6:46 PM### THIS CODE ALLOWS ME TO BIND A LOCAL FILE PATH
from prefect.run_configs import DockerRun
import docker
flow.run_config = DockerRun(labels=['my-label']
,host_config={'mounts':[docker.types.Mount(target='/public'
,source=r'//c/some/local/path'
,type='bind')
]
}
)
### THIS CODE THROWS ERROR
flow.run_config = DockerRun(labels=['my-label']
,host_config={'mounts':[docker.types.Mount(target='/public'
,source=r'\\path\to\windows\network\shared\drive'
,type='bind')
]
}
)
Kevin Kho
Jawaad Mahmood
01/12/2022, 7:31 PMJawaad Mahmood
01/12/2022, 8:11 PM### THIS CODE THROWS AN INVALID ARGUMENT ERROR
flow.run_config = DockerRun(labels=['TGLO-CONSULTDT6','qsbase3']
,host_config={'mounts':[
docker.types.Mount(target='/public'
,source='local'
,type='volume'
,driver_config=docker.types.DriverConfig(name='local'
,options={'type':'cifs'
,'device':r'\\path\to\windows\network\drive'
,'credentials':'user=<username>,domain=<windows_domain>,password=<password>'
}
)
)
]
}
)
Kevin Kho