skip to Main Content

I’m on Ubuntu 20.* and I have the book for symfony 5 “the fast track” (from Fabien Potencier).
But when I try to execute this command below it failed on Docker.

symfony new --version=5.0-1 --book guestbook

Could you help me, please, to run the command :
“symfony new –version=5.0-1 –book guestbook” without any problem. I don’t understand why I have this error :

[WEB] Stopping Docker Containers: [ KO ]
Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

Re-run the command with --debug to get more information about the error

this is my consol result when I execute the command :

Checking Book Requirements
--------------------------

[OK] Git installed
[OK] PHP installed version 7.4.3 (/usr/bin/php7.4)
[OK] PHP extension "json" installed
[OK] PHP extension "session" installed
[OK] PHP extension "ctype" installed
[OK] PHP extension "tokenizer" installed
[OK] PHP extension "xml" installed
[OK] PHP extension "redis" installed
[OK] PHP extension "intl" installed
[OK] PHP extension "pdo_pgsql" installed
[OK] PHP extension "xsl" installed
[OK] PHP extension "amqp" installed
[OK] PHP extension "gd" installed
[OK] PHP extension "openssl" installed
[OK] PHP extension "sodium" installed
[OK] Composer installed
[OK] Docker installed
[OK] Docker Compose installed
[OK] Yarn installed


    Cloning the Repository
----------------------

Clonage dans '/var/www/symfony5/guestbook'...
remote: Enumerating objects: 1170, done.
remote: Counting objects: 100% (1170/1170), done.
remote: Compressing objects: 100% (573/573), done.
remote: Total 1170 (delta 557), reused 1170 (delta 557), pack-reused 0
Réception d'objets: 100% (1170/1170), 4.05 Mio | 1.91 Mio/s, fait.
Résolution des deltas: 100% (557/557), fait.

Getting Ready for the Last Step of the Book
-------------------------------------------

[GIT] Check for not yet committed changes: [ OK ]
[GIT] Check Git un-tracked files: [ OK ]

[GIT] Removing Git ignored files (vendor, cache, ...): [ OK ]
[GIT] Resetting Git staged files: [ OK ]
[GIT] Removing un-tracked Git files: [ OK ]
[WEB] Adding .env.local: [ OK ]
[WEB] Stopping Docker Containers: [ KO ]
Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

Re-run the command with --debug to get more information about the error

When I do the –debug, i have the same result (same error sentences).
My docker is running and it works :

docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

2

Answers


  1. Chosen as BEST ANSWER

    I needed to add "me" as a user in docker group (it was not written in doc, or far away from install doc).


  2. It works for me !
    On linux command line :

    sudo groupadd docker
    sudo usermod -aG docker $USER
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search