https://prefect.io logo
Title
n

Nic

10/25/2022, 2:23 PM
I will start new thread since my last one was marked with a tick even though it's not resolved. I will rephrase it. In the docker block, i need to use the volume argument, currently it says
A list of volume mount strings in the format of "local_path:container_path".
Would following bind my Local G:/ Drive to a G:/ in the docker, or should I write it differently?
1
r

Ryan Peden

10/25/2022, 2:35 PM
If you are using the default Prefect Docker image (or a custom image built on top of it), you'll need to give a Linux-compatible path since it is a Linux container. Something like this should work:
g:/:/opt/prefect/gdrive
and then your shared
g:
drive would be available inside the container at
/opt/prefect/gdrive
. You can mount the shared drive elsewhere in the container if you'd like. But
/opt/prefect
is the working directory Prefect uses in the container, so it seems like a sensible place to put the shared drive.
Just a quick note: the green checkmark means someone is addressing your question, not that it is definitively resolved. Please feel free to keep posting replies in this thread as needed and I or someone else will follow up 🙂
👍 2
🙌 2
n

Nic

10/25/2022, 2:55 PM
Sorry about creating a new thread, i had misunderstood the meaning of the
r

Ryan Peden

10/25/2022, 2:58 PM
No problem at all 🙂 I just wanted to make sure you feel welcome to keep replying here even though I added the
n

Nic

10/25/2022, 3:09 PM
Thanks 👍 - will test the solution when I'm back at work tomorrow and let you know if it worked 🙂
@Ryan Peden it worked with my cdrive, however, i might have forgotten to mention something important, the Gdrive is a network drive (see attached) are there any help/guides on how to make it work with network drives?
r

Ryan Peden

10/26/2022, 6:04 PM
Ahh - right, I missed that. Docker needs an extra step to mount a network folder/drive as a volume on Windows. You'll need to run the
docker volume create
command, as shown in this example. Then you should be able to use the volume you create in the volumes section of your block. You would take whatever name you give your volume and use it instead of
g:/
in the Docker block, so for example if you name your volume
my_network_drive
, the entry in your Docker block would change from
g:/:/opt/prefect/gdrive
to
my_network_driveopt/prefect/gdrive
n

Nic

10/26/2022, 6:08 PM
Was the same solution i had found, but we're talking about changing it so we stay away from network drives and just hist whichever files we need mounted, on the same server as the perfect agent and Docker. I'll leave it for now until that decision is taken - thanks! :)