Docker Community Forums

Share and learn in the Docker community.

How can I install some Containers /Apps / images on other drive than the drive C (windows 10)

My First Docker Desktop on Windows 10 is installed on the C drive and it works.
I also installed Ubuntu on the C drive.

I have only one Containers : hardcore_wing docker/getting-started (port 81). It works
Here is Settings of the Docker Desktop

[unchecked] Automatically check for updates For IT managed environments, upgrade your organization to a paid Team plan to disable checking for updates.
[unchecked] Start Docker Desktop when you log in
[unchecked] Expose daemon on tcp://localhost:2375 without TLS Exposing daemon on TCP without TLS helps legacy clients connect to the daemon. It also makes yourself vulnerable to remote code execution attacks. Use with caution.
[CHECKED] Use the WSL 2 based engineWSL 2 provides better performance than the legacy Hyper-V backend. Learn more.
[CHECKED] Send usage statistics Send error reports, system version and language as well as Docker Desktop lifecycle information (e.g., starts, stops, resets).
[CHECKED] Show weekly tips
[CHECKED] Open Docker Desktop dashboard at startup

Proxies : DISABLE Manual proxy configuration
Network : Configure the way Docker containers interact with the network
Docker subnet

DNS Server
DISABLEManual DNS configuration

WSL Integration
Configure which WSL 2 distros you want to access Docker from
[unchecked] Enable integration with my default WSL distro

Enable integration with additional distros:
**ENABLE** Ubuntu

So now I would install other containers/Apps, like WordPress (mysql or php).
For exemple :
by docker run --name some-wordpress --network some-network -d wordpress or by docker pull joomla
or by $ docker pull laravelsail/php80-composer
or curl -s | bash

But I don’t want to install it on the C drive.
How can I install on the D drive (it is a external hard drive).


here is a solution :slight_smile:
Your web site : D/wwwrooot/your_web_side_folder
Launch Windows Terminal and begin a new terminal session for your WSL2 Linux operating system (for exemple Ubuntu).
You can cd in the Drive or folder, that you want to install. After that run the same command.
$ cd /mnt/d/wwwrooot/your_web_side_folder
and then
yourcompturer : /mnt/d/wwwrooot/your_web_side_folder $ run --name some-wordpress --network some-network -d wordpress