title: AWS beanstalk environment isn't rotating docker container logs
body: <p>I am running a scala app on elastic beanstalk and the server gets overfilled with container logs which are not rotated. 
  The default scheme of beanstalk rotates docker logs in the <code>/var/log/eb-docker/containers/eb-current-app/*</code> folder, but additional logs are accumulating in <code>/var/lib/docker/containers/&lt;container-id&gt;/*</code> and since they are not rotating the disk becomes full very quickly.</p>
  
  <p>I've tried dealing with this problem by adding another logrotation claues to <code>/etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.applogs.conf</code> manually, and this solved the problem.</p>
  
  <p>However, when I try to implement the change in every instance beanstalk launches using an .ebextension config file, the altered log rotation file does not appear on the server.</p>
  
  <p>Here is my .config file - </p>
  
  <pre><code>files:
    "/etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.applogs.conf":
      mode: "000644"
      content: |
        /var/log/eb-docker/containers/eb-current-app/* {
        size 10M
        rotate 5
        missingok
        compress
        notifempty
        copytruncate
        dateext
        dateformat %s
        olddir /var/log/eb-docker/containers/eb-current-app/rotated
        }
  
        /var/lib/docker/containers/*/*.log {
        size 10M
        rotate 5
        missingok
        compress
        notifempty
        copytruncate
        dateext
        dateformat %s
        olddir /var/log/eb-docker/containers/eb-current-app/rotated
        }
  </code></pre>
  
  <p>I've also tried to use the simplest form of config file I've found in this reddit post - <a href="https://www.reddit.com/r/aws/comments/2u3afj/elastic_beanstalk_issues_with_ebextensions/">https://www.reddit.com/r/aws/comments/2u3afj/elastic_beanstalk_issues_with_ebextensions/</a>, but it also failed to have any effect on my launched instances.</p>
  
  <p>Any advice as to why my configuration fails to affect the environment would be greatly appreciated.</p>