Apache2 in docker container gives 403 on statically served files

I’m having a weird issue and am looking for ideas.

I’m running an apache2 debian image that serves some static files, and has a few redirect rules.
Running a container works fine, but results in 403 (permission denied) errors on any request (curl as well as browser).

  • Docker GUI with Mac how to
  • Docker how to use boolean value on spec.container.env.value
  • Unable to run gcloud docker push from google compute engine instance
  • How to see where my website is running after creating a container using docker image?
  • Docker - unable to mount start mongodb in container - operation not permitted
  • What is the purpose of VOLUME in Dockerfile
  • When I then exec into the container and perform an ls in a static file folder (such as css), those files are being served correctly on the next request.
    My current workaround is a startup script with a find /var/www/html/ -name '*'. This makes the container work as expected, with all the served files being accessible.

    • All the files have the correct owner (www-data) and permissions.
    • Docker version 1.7.1, but issue appeared also on 1.7.0
    • I’m running an Ubuntu VM, but my colleague reproduced this on a mac with docker machine.

    Whatever could be a reason for this behaviour?

  • Application deployment using docker in clustered environment
  • Error starting userland proxy: listen tcp0.0.0.0:3306: bind: address already in use
  • Is there a way to “publish” ports from a container when using “fig run”?
  • Is supervisord needed for docker+gunicorn+nginx?
  • How can I grab exposed port from inspecting docker container?
  • What is the overhead of creating docker images?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.