instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.63k stars 2.49k forks source link

docker_dev_setup fails when docker is not run as a service #1814

Open svenfinke opened 3 years ago

svenfinke commented 3 years ago

Summary:

I tried to install Canvas with the docker_dev_setup script under Ubuntu 20.04 in WSL 2. In this case I don't have access to systemctl or service under ubuntu, so the docker deamon won't run as a traditional service. But the docker daemon is running and is being started by my .bashrc file.

Steps to reproduce:

  1. Remove docker from services
  2. Add script to start dockerd in .bashrc, .zshrc or something similar
  3. Run the setup script

Expected behavior:

Install succeeds as docker daemon is running.

Actual behavior:

Install fails because the scripts checks for the service and not acutally if the daemon is running.

Additional notes:

rryando commented 1 year ago

I have successfully run docker_dev_setup in WSL2 with minor hiccup, but it is doable (everything run in WSL2) since I figured out that function for daemon run check only does by running service or systemctl command,

and AFAIK for WSL2 with docker desktop windows, no fix for checking docker service run with internal service commands,

meanwhile docker service should be up and running via from windows docker-desktop to wsl2 backend (running docker in wsl would give expected result),

So, by simply skipping the check, will allow the script to continue to install To skip the check, simply comment out the start_docker_daemon in ./script/common/os/linux/dev_setup.sh on line 25