Accessing Windows D: Drive in Immich Server Setup on Docker with WSL 2
Overview of the Issue
I have been trying to set up immich using Docker on a WSL 2 environment while allowing the immich-server to access files on my Windows D: drive (D:\Images). I updated the docker-compose.yml file to include a volume mount for the Windows directory. However, the immich-server container has been unable to see or access the specified directory. Despite correctly setting up the volume mount in Docker, the issue persists.
Setup Details
Operating System: Windows with WSL 2 enabled.
Docker: Using Docker Desktop with WSL 2 backend.
Target Directory: The Windows directory D:\Images, which is mounted in WSL at /mnt/host/d/Images.
Docker Compose File: The docker-compose.yml file is configured to mount the Windows path to the container for the immich-server and immich-web services.
Environment File: .env file used to set UPLOAD_LOCATION and database connection details.
Steps Taken
Modified the docker-compose.yml to include the volume mount:
volumes:
- /mnt/host/d/Images:/app/images
Verified that Docker Desktop is set up correctly with WSL 2 integration.
Updated the .env file to ensure the correct UPLOAD_LOCATION is set.
Tried accessing the directory within the container using docker exec for debugging purposes.
Problems Encountered
Permissions Issues: The container seems to be unable to access files within the /mnt/host/d/Images directory.
Volume Mount Conflicts: Possible conflicts between the UPLOAD_LOCATION environment variable and the paths in the volume mounts.
WSL Path Handling: Potential issues in how Docker Desktop handles WSL paths, causing the server to not see the intended files.
.