I am wondering if AWS Beanstalk supports docker data volumes or does it only support host volumes? I am reading the beanstalk documentation and I see that Volumes
in the Dockerrun.aws.json
is for the EC2 directories (host). I then figured a docker data volume must simply be a separate container for housing data but when I read this in the docker documentation:
Create and manage volumes
Unlike a bind mount, you can create and manage volumes outside the scope of any container.
To me that indicates that a data volume is NOT a container. With that said, how can I create one using elastic beanstalk if Volumes is for host directories and a docker volume is different than a container? Is this not supported?
Basically I want elastic beanstalk to do this:
$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
using the config:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "someimage:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8081"
}
],
"Volumes": [
{
"nexus-data": "/nexus-data" <-- This is for host = Wrong!
}
],
"Logging": "/var/log/nginx"
}