I have a Tomcat docker container and want to deploy my webapp on it with Elasticbeanstalk.
With plain docker I don't add my war file to the container but reference to it via the -v flag like:
docker run --rm -v data/myfile.war:/usr/local/tomcat/webapps/myFile.war
This allows me to reference directly to my war file. I have pushed my image to my docker-hub repo. Within my Dockerrun.aws.json I want to do the ref of the war file. I know there is the option to do something like:
"Volumes": [
{
"HostDirectory": "/data",
"ContainerDirectory": "/data"
}]
But that leaves me with the question where is my war file on the Host directory?! My workflow is that I package these files:
- Dockerrun.aws.json
- war file
and upload them to aws. But I don't know where the zip file gets extracted on the ec2 instance. Therefore I have no idea how I should reference the volumes to. Basically I want to do something like this:
"Volumes": [
{
"HostDirectory": "?/myFile.war",
"ContainerDirectory": "/usr/local/tomcat/webapps/ROOT.war"
}]
The ? is basically the part I don't know about
I'm using the web UI. I can upload the zip file that has the Dockerrun.aws.json and the war file. But what do I declare within the Volumes part within the Dockerrun.aws.json I don't know where aws is extracting my war file I want to do something like:
I could not find anything within the aws documentation. Anyone an idea?
Aucun commentaire:
Enregistrer un commentaire