Can I specify a file instead of a directory to send to the container in the Dockerrun.aws.json file?

I cannot find the reference documentation to the available fields in Dockerrun.aws.json. I’m trying to import /dev/log from the host into the container so that I can centralize logs to logstash.

From the example, we can see that there is “HostDirectory” and “ContainerDirectory” however I can’t find any analogue for “HostFile”/”ContainerFile”.

  • AWS elastic beanstalk not mounting docker volumes
  • How to remove docker installed using wget? [closed]
  • Compile Tensorflow from source with Docker to get CPU speed up
  • Enterprise Apps with Docker and Elastic Beanstalk
  • Docker - nginx with custom conf
  • netcat for MySQL connection forwarding
  • How can I specify a single file to be shared with an elastic-beanstalk-enabled docker container?

    {
      "AWSEBDockerrunVersion": "1",
      "Authentication": {
        "Bucket": "my-bucket",
        "Key": "mydockercfg"
      },
      "Image": {
        "Name": "janedoe/image",
        "Update": "true"
      },
      "Ports": [
        {
          "ContainerPort": "1234"
        }
      ],
      "Volumes": [
        {
          "HostDirectory": "/var/app/mydb",
          "ContainerDirectory": "/etc/mysql"
        }
      ],
      "Logging": "/var/log/nginx"
    }
    

  • iptables rules break communication between Docker containers
  • Error response from daemon: getsockopt: connection refused
  • How to run a docker container if not already running
  • Best way to reduce the size of a custom Docker image
  • Creating a python script for selenium testing
  • Linux based docker images on Windows Server 2016 TP5
  • One Solution collect form web for “Can I specify a file instead of a directory to send to the container in the Dockerrun.aws.json file?”

    You can mount a host file as a data volume: https://docs.docker.com/userguide/dockervolumes/#mount-a-host-file-as-a-data-volume

    So you should be able to use the "Volumes" section to mount your file to your container.

      "Volumes": [
        {
          "HostDirectory": "/dev/log",
          "ContainerDirectory": "/dev/log"
        }
      ]
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.