When I’m trying to run Shopware locally, I am able to start a Docker container. However, I am unable to ssh into it.
I’m following the readme exactly step by step.
First, I run:
./psh.phar docker:start
The container is running ok and has an id when I run docker ps.
Next, the readme says "ssh into the container with":
./psh.phar docker:ssh
Which gives me the following error:
Error Output:
================
No such service: app_server
in /shopware-test/psh.phar/vendor/symfony/process/Process.php:232
Stack trace:Fatal error: Uncaught
SymfonyComponentProcessExceptionProcessFailedException: The
command "docker-compose ps -q app_server" failed.
I’m trying to figure out what I’m doing wrong. I cloned the following repo:
https://github.com/shopwareLabs/shopware-docker
Here is my docker-compose.yml file:
version: "3"
services:
shopware:
# use either tag "latest" or any other version like "6.1.5", ...
image: dockware/dev:latest
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=7.4
volumes:
db_volume:
driver: local
shop_volume:
driver: local
networks:
web:
external: false
Can someone point me in the right direction? Should I open an issue at the repo?
2
Answers
I think you should name the container in your shopware service like:
Your docker-compose.yml file is already looking good.
the only thing you need to take care of is, not to mix up psh ssh stuff with regular ssh connections.
so your container uses dockware/dev and has port 22 exposed, which is great.
psh (did) just wrap some commands, but you already have it setup correctly.
just do a plain ssh (or in phpstorm) to localhost, port 22 and default credentials of dockware (dockware/dockware) in that case.
to get into the container, i would recommend the default docker way
then it should work
ps (saw the nice words from dnaumann, thx for that)