instructure / canvas-lms

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

Docker setup doesn't work: `docker-compose run --rm web ./script/install_assets.sh` fails #2342

Open ldorigo opened 7 months ago

ldorigo commented 7 months ago

The docs say:

Now we can install assets, create and migrate databases.

docker-compose run --rm web ./script/install_assets.sh docker-compose run --rm web bundle exec rake db:create db:initial_setup docker-compose run --rm web bundle exec rake db:migrate RAILS_ENV=test

However, docker-compose run --rm web ./script/install_assets.sh fails because ./script/install_assets.sh does not exist inside the container, and the docs don't mention any step in which that file should be copied inside the container?

(for reference, the error I get is:

WARN[0000] /home/ldorigo/Dropbox/projects/learnwise/canvas-lms/docker-compose.yml: `version` is obsolete 
[+] Creating 2/0
 ✔ Container canvas-lms-redis-1     Running                                                                                                             0.0s 
 ✔ Container canvas-lms-postgres-1  Running                                                                                                             0.0s 
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./script/install_assets.sh": stat ./script/install_assets.sh: no such file or directory: unknown   

)

Wakeful-Cloud commented 5 months ago

I ran into this exact issue - it was caused by the bind mount in the docker-compose.override.yml not passing through everything (including and especially the script folder); this was ultimately caused by me running Docker-in-Docker, though there are likely other causes.