Volumes on Docker Desktop for macOS (Immich)

Hi all,
I am trying to sort out my pictures using Immich and I am running into an issue.
I have set up Immich properly and now need to set up a volume to manage my external library (files that are on an external hard-drive). This is what the docker compose yml looks like at the relevant part:

I have already added the relevant line to get my photos from “/Volumes/Archive”, but I don’t know what to put after the “:”, which should be the volume from Docker. I have gone to Docker Desktop and created a volume called “archive-photos”, but even after launching the container, it shows as “not in use” and when I try and use the volume’s path (which I assume is just its name, right?) Immich tells me the path is wrong. I have tried asking on the Immich forum, but they seem to indicate that Docker behaves differently on macOS for the management of Volumes.
Any ideas?

Please, use </> button to share codes, terminal outputs, error messages instead of sharing screenshots. That helps others to search for similar issues and us to read it more easily and quote parts of the message so we can help you more quickly. You can find a complete guide in the following post: How to format your forum posts

Note that if you share screenshots of texts, some of our users will not even look at that text.

Volumes actualy work the same way. Bind mounted folders don’t, just because Docker Desktop has to make the folders available inside the virtual machine. You are using bind mounts. I wrote about volumes here and left some links to the documentation:

So “folder on the host”, “:”, “Folder inside the container using absolute path”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Hi,
I was too slow to respond in this thread, so I am opening a new one to follow up.
First of all, thanks @rimelek for taking the time to answer. Unfortunately, I am still a little lost.
Currently the “volumes” part of my docker-compose.yml contains the line:
- /Volumes/Archive:/archive-photos:ro
With /Volumes/Archive being the path of my external hard-drive (and, in it, the folders I am trying to use in Immich), and /archive-photos being the desired path inside the container. But how do I get /archive-photos set up within Docker Desktop?

No problem, I reopened the topic and moved the new post to this topic.

This is already the right way. What is the current issue? Why do you think it doesn’t work? Last time you wrote the volume was shown as unused, but now you know you don’t need a volume in Docker, because you can bind mount the folder from the host into the container. So what is the current issue? Is the mounted folder empty inside the container?

Thanks @rimelek. The reason I think is this is not working is because when I follow Immich’s procedure for external libraries, and add the path above in the docker-compose file, it tells me invalid import path - path does not exist.

From your message, I am not getting the “you can bind mount the folder from the host into the container” part. Maybe this was explained in your links and I did not get it, but how does one do that in Docker Desktop?

You are doing that… That is bind mounting what you just shared in your previous message. I really recommend reading the shared sources as if you don’t understand the “language” of Docker, it will be hard to help. In case of Docker Desktop “bind mount” is a little bit more s first the fodler has to be shared with the virtual machine but it is not important to you for now. The result should be the same since “/Volumes” is already shard with Docker Desktop.

Please, forgive me that I don’t go thorugh the Immich documentation even though I asked you to read what I shared, but the error messge seems to be error message thrown by the application, not Docker first you need to check whether the files are in the container where they should be. You can even browse files using the GUI after clicking on a container and go t the “Files” tab. It works if the container is running. If not, there are other ways but I don’t want to confuse you more than necessary.

Unless you can confirm that the files are not there, it seems to be an application configuration issue or bug. If the files are not there, we can talk about why and we can try to help you fix it.

Thank for the detailed answer and, to be frank, I did try and read your doc, but kinda got lost.

Actually, just now, as I fired up Docker Desktop and started the Immich container, I got the following error message:

Cannot start Docker Compose application. Reason: compose [start] process 75342 exited with exit code 1 () and WaitStatus 256. Container immich_machine_learning Starting Container immich_postgres Starting Container immich_redis Starting Container immich_machine_learning Started Container immich_postgres Started Container immich_redis Started Container immich_server Starting Error response from daemon: error while creating mount source path ‘/host_mnt/Volumes/Archive’: mkdir /host_mnt/Volumes/Archive: permission denied

It sounds related to the volume/bind mount.

Wait, actually, this is probably because the hard drive in question is not currently plugged. I’ll have to try again when I have the hard drive at hand.

Ok, I am not sure what happened but it works. I deleted everything, reinstalled Immich and the path is not valid. Thanks for the support, sorry for the disturbance, and fingers crossed. PS: this did lead me to try and know more about the functioning of Docker itself, without relying in the GUI, so this was still useful!