Why I failed install and run laravel/sail on existing laravel 10 site?

78 Views Asked by At

I try to install laravel/sail on laravel 10 site and installing the package

$ composer require laravel/sail --dev
./composer.json has been updated
Running composer update laravel/sail
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading laravel/sail (v1.25.0 => v1.26.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Upgrading laravel/sail (v1.25.0 => v1.26.3): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.

  barryvdh/laravel-ide-helper ................................................................................................................. DONE
  bensampo/laravel-enum ....................................................................................................................... DONE
  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/telescope ........................................................................................................................... DONE
  laravel/tinker .............................................................................................................................. DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE
  spatie/laravel-ignition ..................................................................................................................... DONE

93 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force

   INFO  Publishing [laravel-assets] assets.

  Copying directory [vendor/laravel/telescope/public] to [public/vendor/telescope] ............................................................ DONE

No security vulnerability advisories found.
Using version ^1.26 for laravel/sail

Next I install laravel/sail - it seems succesfull, but output of the command seems very short(I mean I compared with some video tutorials)
$ php artisan sail:install

 ┌ Which services would you like to install? ───────────────────┐
 │ mysql                                                        │
 └──────────────────────────────────────────────────────────────┘

Sail scaffolding installed successfully.

But starting docker I got error :

$ ./vendor/bin/sail up
Docker is not running.

As I have docker installed priorly and check status and see it is active :

# sudo systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2024-01-06 11:45:14 EET; 4h 36min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 3560 (dockerd)
      Tasks: 12
     Memory: 23.7M
        CPU: 2.968s
     CGroup: /system.slice/docker.service
             └─3560 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

січ 06 11:45:12 master-at-home dockerd[3560]: time="2024-01-06T11:45:12.353770428+02:00" level=info msg="Starting up"
січ 06 11:45:12 master-at-home dockerd[3560]: time="2024-01-06T11:45:12.362220937+02:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/re>
січ 06 11:45:12 master-at-home dockerd[3560]: time="2024-01-06T11:45:12.760263760+02:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
січ 06 11:45:12 master-at-home dockerd[3560]: time="2024-01-06T11:45:12.875506540+02:00" level=info msg="Loading containers: start."
січ 06 11:45:13 master-at-home dockerd[3560]: time="2024-01-06T11:45:13.574182806+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used t>
січ 06 11:45:13 master-at-home dockerd[3560]: time="2024-01-06T11:45:13.669577614+02:00" level=info msg="Loading containers: done."
січ 06 11:45:13 master-at-home dockerd[3560]: time="2024-01-06T11:45:13.767087307+02:00" level=info msg="Docker daemon" commit=311b9ff graphdriver=overlay2 version=24.0.7
січ 06 11:45:13 master-at-home dockerd[3560]: time="2024-01-06T11:45:13.767348325+02:00" level=info msg="Daemon has completed initialization"
січ 06 11:45:14 master-at-home dockerd[3560]: time="2024-01-06T11:45:14.468725385+02:00" level=info msg="API listen on /run/docker.sock"
січ 06 11:45:14 master-at-home systemd[1]: Started Docker Application Container Engine.
lines 1-22/22 (END)

I restarted docker, but got the same error when running sail :

# sudo service docker restart

What is wrong and how it can be fixed ?

# docker info
Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 0
  Paused: 0
  Stopped: 4
 Images: 11
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.2.0-35-generic
 Operating System: Ubuntu 22.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.668GiB
 Name: master-at-home
 ID: bdca7024-7ecd-4a28-93b6-b1604e696f49
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

# docker images
REPOSITORY           TAG       IMAGE ID       CREATED         SIZE
agent_form/php       latest    610d2cba9245   3 days ago      1.22GB
<none>               <none>    03f7b3e13dbb   3 days ago      1.22GB
<none>               <none>    73ec64453d7f   3 days ago      1.22GB
<none>               <none>    0cc60a9cfaaa   3 days ago      1.22GB
axllent/mailpit      latest    57df6464981f   4 days ago      27.3MB
redis                alpine    d2d4688fcebe   4 weeks ago     41MB
docker-web           latest    86cdb0136207   4 weeks ago     888MB
adminer              latest    7554c8e10d81   6 weeks ago     250MB
mysql/mysql-server   8.0       1d9c2219ff69   11 months ago   496MB
composer             2.4       743874dc40b8   14 months ago   198MB
mysql                8.0.21    8e85dd5c3255   3 years ago     544MB

        
        # docker ps -a
CONTAINER ID   IMAGE                    COMMAND                  CREATED        STATUS                    PORTS     NAMES
be700299153b   agent_form/php           "start-container"        34 hours ago   Exited (0) 24 hours ago             severe-project-laravel.test-1
c6ff379009ea   mysql/mysql-server:8.0   "/entrypoint.sh mysq…"   34 hours ago   Exited (0) 24 hours ago             severe-project-mysql-1
d4fbdf5ee79a   redis:alpine             "docker-entrypoint.s…"   34 hours ago   Exited (0) 24 hours ago             severe-project-redis-1
8cb5137370f7   axllent/mailpit:latest   "/mailpit"               34 hours ago   Exited (0) 24 hours ago             severe-project-mailpit-1

I do not see any containers in listing above excepting severe-project I have priorly...

"laravel/framework": "^10.8",
"laravel/sail": "^1.26",

Thanks in advance!

0

There are 0 best solutions below