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 Swarm with Consul - Manager not electing primary
  • Exposing a Docker container port
  • Centos 6.6, python 2.7.2 object has no attribute 'StringIO
  • ActiveMQ within Wildfly on a Docker container gives: Invalid “host” value “0.0.0.0” detected
  • What is the correct way to run an nginx docker container in OpenShift?
  • Automatically configure Java to use the maximum RAM allocated to its Docker container
  • 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?

  • Upgrading docker without affecting running containers
  • Boot2Docker/Fig mounted volume not refreshing
  • “CMD ['/home/user/script.sh']” in docker file doesn't work with docker-compose
  • What is location of images pulled from Docker Hub via Docker for Mac
  • start multiple processes in docker container from Dockerfile
  • Dockerized PHP Application Architecture Best Practices
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.