I have created a tiny docker image of an app that stores files in in /home/media. I can see that the files are there even after I restart the application and listing all files in the directory also works but I get a 502 response when I try to access the files.
I see this in the browser:
502 - Web server received an invalid response while acting as a gateway or proxy server.
The application log says this:
2021-06-01T00:02:06.268746288Z: [INFO] 172.16.0.1 - jack [01/Jun/2021:00:02:06 +0000] "GET /content/anyflow/cloud4.png HTTP/1.1" 200 524176 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
Here is my Dockerfile:
FROM php:7.3.0-apache
COPY src/ /var/www/html/
COPY htpasswd.template/etc/httpd/.htpasswd
RUN mkdir -p /home/media/content
RUN chown -R www-data:www-data /home/media
RUN ln -s /home/media/content /var/www/html/content
EXPOSE 80
I can download the files I uploaded to /var/www/html in the docker image but not the files I put in /home/media/content.
What could be wrong and how do I debug this?