Start the brand-new WordPress service with Docker:
version: "3.7"
services:
db:
# restart: always
image: mysql:5.7
environment:
MYSQL_DATABASE: wordpressdb
MYSQL_USER: tester
MYSQL_PASSWORD: tester1234
MYSQL_RANDOM_ROOT_PASSWORD: "1"
volumes:
- mysql_data:/var/lib/mysql
wordpress:
image: wordpress:latest
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: tester
WORDPRESS_DB_PASSWORD: tester1234
WORDPRESS_DB_NAME: wordpressdb
volumes:
- wordpress_data:/var/www/html/wp-content
volumes:
wordpress_data:
mysql_data:
In order to make some dummy post for theme testing, I try this plugin: FakerPress
Generate about 10 post and check the default theme.
Since I start the docker in Windows WSL2, I can attach VSC to the WordPress container directly:

After attach VSC successfully, open the folder: /var/www/html/wp-content/themes/

Let's start a new theme - Create a folder called mytesttheme
Let's See some reference:
- How to Create WordPress Theme from Scratch : Beginners Guide (2020) section - "How to Create Custom WordPress Theme step by step?"
- How to Create a Minimal WordPress Theme
I follow the "How to Create a Minimal WordPress Theme". I create the files and the the file structure like this:

Theme preview in WordPress looks like this:
