English | 日本語
This is Docker + WSLg + devcontainer.json + Python template.
The sample is in python, but other images are also possible.
Required
-
Windows 11 (for WSLg)
-
(Required to display Docker GUI on windows)
-
git
-
Docker Desktop for Windows (Build any environment with virtual containers)
Optional
- VS Code
(for easier development)
- Extension Remote Development
Warning: Be sure to run it in the WSL directory. Otherwise, the wslg directory will not be mounted correctly and the GUI will not be displayed.
Step 1: Run the following command.
git clone https://github.com/SARDONYX-sard/docker-wslg-gui-template.git
cd docker-wslg-gui-template
Step2: Enter the following command and then enter the container created.
make compose
Step 1: Run the following command.
git clone https://github.com/SARDONYX-sard/docker-wslg-gui-template.git
cd docker-wslg-gui-template
code .
Step 2: Click on the WSL: <Linux name>
icon in the lower left corner.
Step 3: Select the item Reopen in Container
from the palette that appears in
the center.
Command | Description |
---|---|
make compose-conf |
Set .env.wsl & Show docker-compose.yml config |
make compose-up |
Create container by docker-compose.yml |
make start |
Run python file(default: src/main.py ) |
make install-dev |
Install dependencies (For dev) |
make install |
Install dependencies (For prod) |
make lint |
Lint with pysen |
make lint-fix |
Lint fix with pysen |
make test |
Test with pytest |
make ci |
Remove .venv dir & Install dependencies |
make clean |
Remove cache files |
If you are using windows, you can install the make
command
here.
(Click the Setup
button at the top.)
docker-wslg-gui-template
├── .devcontainer
| └── devcontainer.json
├── .editorconfig
├── .github
| ├── dependabot.yml
| └── workflows
| └── ci.yml
├── docker
| ├── .env.wslg
| ├── Dockerfile
| └── docker-compose.yml
├── docs
| ├── i18n
| | └── jp
| └── images
| └── gui-sample.png
├── scripts
| └── set-wslg.sh
├── src
| ├── main.py
| └── utils
| ├── __init__.py
| └── operator.py
├── tests
| ├── __init__.py
| └── test_operator.py
├── .gitignore
├── LICENSE
├── Makefile
├── poetry.lock
├── pyproject.toml
└── README.md