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”.

  • How to determine bridge IP of docker swarm container
  • Cannot seem to install Google Cloud Managed VMs
  • Docker: connection between golang webapp and postgres server refused
  • How to add filter in fluentd
  • “docker run hello-world” through a proxy tunnel
  • Docker commit doesn't save the changed state of my container
  • 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"
    }
    

  • How is the rootfs size of docker container is decided?
  • Post a Json file to elasticsearch running on Docker, Kitematic on Windows 10
  • Docker-Compose: Composing with Dockerfiles that need relative imports
  • Understanding a docker entrypoint script
  • Docker, Nginx and PHP7: ERROR 111 Connection refused while connecting to upstream
  • Rancher template - Hadoop Illegal character in host-name
  • 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.