Docker build fails to copy static files
thprice opened this issue · comments
For anybody wanting to build their own docker image: make sure the the static files are not excluded in .dockerignore.
In the current version, they are (due to the '**/static' rule).
Otherwise, you will experience a very barebones UI as all css and javascript files are missing and cannot be sent to the browser.
I rermoved that line form dockerignore and rebuilt.
usr/src/reminiscene/static/js
is there in container
-rw-rw-r-- 1 1000 1000 257028 Jan 27 15:33 annotator.min.js
-rw-rw-r-- 1 1000 1000 9972 Jan 27 15:33 bootbox.min.js
-rw-rw-r-- 1 1000 1000 48944 Jan 27 15:33 bootstrap.min.js
-rw-rw-r-- 1 1000 1000 205189 Jan 27 15:33 epub.min.js
-rw-rw-r-- 1 1000 1000 86927 Jan 27 15:33 jquery-3.3.1.min.js
-rw-rw-r-- 1 1000 1000 44209 Jan 27 15:33 main.js
-rw-rw-r-- 1 1000 1000 334638 Jan 27 15:33 pdf.min.js
-rw-rw-r-- 1 1000 1000 773808 Jan 27 15:33 pdf.worker.min.js
-rw-rw-r-- 1 1000 1000 20337 Jan 27 15:33 popper.min.js
-rw-rw-r-- 1 1000 1000 292087 Jan 27 15:33 summernote-bs4.js
but
WARNING:django.request:Not Found: /static/js/bootbox.min.js
I obviously removed that line as well. There may be side effects because I don't know why it was in there in the first place.
However, I don't experience the file not found issue. But then, I serve the static files through an nginx container.