Skip to content

SARDONYX-sard/docker-wslg-gui-template

Repository files navigation

Docker + WSLg GUI-Template

English | 日本語

About

wsl-ubuntu

This is Docker + WSLg + devcontainer.json + Python template.

The sample is in python, but other images are also possible.

Table of Contents

Prerequisites

Required

  • Windows 11 (for WSLg)

  • WSLg

    (Required to display Docker GUI on windows)

  • git

  • Docker Desktop for Windows (Build any environment with virtual containers)

Optional

Quick Start

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.


If you are using an editor other than VS code

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

VS code User

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.

wsl-ubuntu

Step 3: Select the item Reopen in Container from the palette that appears in the center.

wsl-ubuntu

Make usage

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.)

Directory structure

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

License

Unlicense