Setup Shopware 6 using Dockware for Developer

First create a directory for the project call it SW6. Notice the project directory should be in the WSL.

In the same directory create a file call it docker-compose.yml.

Inside it paste the following code:

version: "3"

services:

    shopware:
      # use either tag "latest" or any other version like "6.5.3.0", ...
      image: dockware/dev:latest
      container_name: shopware
      ports:
         - "80:80"
         - "3306:3306"
         - "22:22"
         - "8888:8888"
         - "9999:9999"
      volumes:
         - "db_volume:/var/lib/mysql"
         - "shop_volume:/var/www/html"
      networks:
         - web
      environment:
         # default = 0, recommended to be OFF for frontend devs
         - XDEBUG_ENABLED=1
         # default = latest PHP, optional = specific version
         - PHP_VERSION=8.1

volumes:
  db_volume:
    driver: local
  shop_volume:
    driver: local

networks:
  web:
    external: false

Then execute the follwoing docker-compose up -d command to build the container.

After that you should have it like this in your docker desktop app.

Browse the files of the container:

Click tool -> deployment -> browse remote host. 

Then it will open a bar on the right side as in the Screenshot.

In the name field write dockware.

After you clicked ok, you will get the following tab.

 

In the next step click on the … points. Now you have the option to add a new SSH-Configuration, to do that chose the + symbole

Host: localhost
Username: dockware
Password: dockware
Port: 22
Now you can test the connection, if it was success then click apply and ok.

In the following window write in the Root Path field: var/www/html/. After that should be the connection successfully established. 

On the right side of phpstorm you have the files of the continer (Shopware files).