0
votes

I'm trying to sync a folder, full of folders which have log files in, from a single docker container instance deployed on AWS elastic beanstalk. I've used the logging directive as shown here https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/single-container-docker-configuration.html but when I request the full logs none of my logs are downloaded

Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    ~snip~
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": 80
    }
  ],
  "Logging": "/var/log/applogs"
}

Container structure:

bash-4.2# ls -la /var/log/applogs/
total 8
drwxr-xr-x  2 root root 4096 Dec  5 15:35 .
drwxr-xr-x 12 root root 4096 Dec  5 15:35 ..
lrwxrwxrwx  1 root root   34 Dec  5 15:35 app -> /var/www/html/app/storage/logs
lrwxrwxrwx  1 root root   14 Dec  5 15:35 httpd -> /var/log/httpd
lrwxrwxrwx  1 root root   16 Dec  5 15:35 php-fpm -> /var/log/php-fpm

It was my impression that the logging directive would recursively include (And also follow symlinks) all log files in the directory specified, but it's not bringing anything across. Am I wrong about that or just doing something wrong here?

1

1 Answers

0
votes

I solved this by symlinking the individual log files in the container, not ideal but it will have to do