Documentation : can't execute command ???
Hi, After installing numberninecms with docker, as show in the documentation (Installation Docker one-liner), I want to create database and admin user.
in shell, in my project folder, i try to execute :
docker-compose exec php bin/console numbernine:user:create --admin
I obtain this answer :
ERROR: No container found for php_1
I've the same answer for other commands show in your documentation.
When i try to execute :
docker-composer up
It will launch the application, but i can't access to the docker instance and try to execute commands in its own shell. Can you help mye please ?
Gilbert ARMENGAUD Celtic34fr Béziers - Occitanie - France
Hi, thanks for the feedback. I can't reproduce your problem. What OS, Docker Desktop and Compose versions are you using?
Hi, I used Ubuntu 21.10 OS, and my docker version are :
- docker-ce 5:20.10.14-3-0-ubuntu-impish
- docker-compose 1.27.4-1 this packages came from download.docker.com repository
I'm not sure but the problem might come from Compose.
Is there a way you can test with Compose v2 ?
Try to replace docker compose instead of the dashed docker-compose.
On Docker Desktop for Windows/WSL, docker-compose is just an alias of docker compose so that might be why I can't reproduce the problem.
OK, I'll take time to search docker or docker-ce without docker-composer as i use,. When i try to exec the command with 'docker compose' instead of 'docker-compose', the command return the help man, and in the command list, i don't find compose. Can you give me the version of docker that you use under Windows WSL ?
I use docker engine 20.10.14 with compose 2.4.1, the Github CI uses compose 2.4.1 as well.
If upgrading compose doesn't solve the problem:
- check what containers are running with
docker container ls. You should see 5 containers running prefixed withmyproject_or the name you gave to your app - delete all these prefixed containers
- check that docker-compose.yml is present in the directory, and that's it's similar to this file https://github.com/numberninecms/cms/blob/master/install/docker-compose.yml
- restart the stack with
docker-compose up
Maybe the installation silently failed and didn't copy all necessary files?
You can also launch the installation with debug mode by suffixing the command with -v:
docker run --rm --pull=always -t -e HOST_PWD=$PWD \
-v $PWD:/srv/app -v /var/run/docker.sock:/var/run/docker.sock \
numberninecms/installer myproject -v