the-paperless-project / paperless

Scan, index, and archive all of your paper documents
GNU General Public License v3.0
7.85k stars 498 forks source link

Docker healthcheck failing -- curl not installed? #429

Open robkroll opened 5 years ago

robkroll commented 5 years ago

Hi, trying to start the containers with docker-compose seems to never start the consumer because the healthcheck is failing. I'm new to docker so I'm not really that advanced in how to debug it, but I noticed it was taking a lot of time to start so I commented out the healthcheck and it starts the webserver and consumer both very fast.

If I start a shell on the webserver: docker-compose exec webserver sh

And run the healthcheck command:

/usr/src/paperless/src # curl -f http://localhost:8000
sh: curl: not found

Running apk get to install it works:

/usr/src/paperless/src # apk update && apk add curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.1-29-ge8447864e9 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.1-28-gb4f049a13b [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 9066 distinct packages available
(1/3) Installing libssh2 (1.8.0-r2)
(2/3) Installing libcurl (7.61.1-r0)
(3/3) Installing curl (7.61.1-r0)
Executing busybox-1.27.2-r7.trigger
OK: 284 MiB in 120 packages

Then, running curl still doesn't work, it gives a 301 Moved Permanently to /admin/login/ but then doing curl -f http://localhost:8000/admin/login seems to produce some output.

I'm using Docker version 18.06.0-ce, build 0ffa825.

danielquinn commented 5 years ago

Well that's odd, 'cause the Dockerfile includes an installation of curl. Are you building a custom Docker instance? Here's what happens for me when I use the one on Docker Hub:

$ docker pull danielquinn/paperless
Using default tag: latest
latest: Pulling from danielquinn/paperless
4fe2ade4980c: Already exists 
ff1d21f2f9c3: Pull complete 
54155c3475d2: Pull complete 
5672b9d6e31c: Pull complete 
234d6377957a: Pull complete 
c7bff43526d5: Pull complete 
6c4dade1e23d: Pull complete 
179610d71574: Pull complete 
Digest: sha256:45eb75474ca06242c4dec4f71fd883a605808b5603882b2e6449aedf024cf464
Status: Downloaded newer image for danielquinn/paperless:latest

$ docker run --rm -it danielquinn/paperless /bin/sh

/usr/src/paperless/src # curl https://google.ca/
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.ca/">here</A>.
</BODY></HTML>
/usr/src/paperless/src #