Use Docker Compose from your Windows Subsystem for Linux (WSL) distribution from an IDE that integrate Docker Compose like PyCharm on Windows
This tool will translate the Windows path(s) passed to the docker-compose binary, but also the one(s) inside the docker-compose file(s) passed as argument(s).
The latest binary can be found on the release page
- Download the latest binary
- Move the binary to any directory accessible by the PyCharm IDE
- In PyCharm, go to
File > Settings...
- In the
Settings
window, go toBuild, Execution, Deployment > Docker > Tools
and set the Docker Compose executable path to the docker-compose-wsl binary path
This tool should work with any IDE that use the docker-compose command-line tool, but was only tested with PyCharm
-
Download and install the latest Python 3 interpreter
-
Open a command prompt
-
Install virtualenv
> pip install virtualenv
-
Create and activate the new virtual environment
> virtualenv docker-compose-wsl > docker-compose-wsl\Scripts\activate
-
Install the dependencies in the virtual environment
(docker-compose-wsl) > pip install -r requirements.txt
-
Run PyInstaller in order to create the binary
(docker-compose-wsl) > pyinstaller --onefile .\docker-compose-wsl.spec
-
The binary will be available in the dist directory
- Andy-5 for WSLGit which served as the inspiration for creating this tool