Skip to content

Instantly share code, notes, and snippets.

@mosheeshel
Last active January 1, 2017 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosheeshel/ba81925f7ba25e12cd599420b44eab09 to your computer and use it in GitHub Desktop.
Save mosheeshel/ba81925f7ba25e12cd599420b44eab09 to your computer and use it in GitHub Desktop.
Simplified example of AWS multi-container docker definition for Elastic Beanstalk, including authenticating to external non public docker registry to pull images
{
"AWSEBDockerrunVersion": 2, /* newer multi container format */
"authentication": {
/* if working with non ECR or non public docker registries, this is required, points to file in S3,
that has the correct auth data, this could hold auth for multiple registries,
see here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-images-private
*/
"bucket": "s3-bucket-name",
"key": "prefix"
},
"containerDefinitions": [
{
"name": "app",
"image": "docker.jfrog.io/app:latest",
"environment": [
{
"name": "Container",
"value": "app"
}
],
"essential": true,
"memory": 1024,
"portMappings": [
{
"hostPort": 8080,
"containerPort": 8080
},
{
"hostPort": 8081,
"containerPort": 8081
}
],
"mountPoints": [
{
"sourceVolume": "awseb-logs-app", /* maps the default container logs folder created by EB/ECS to the internal docker volume */
"containerPath": "/var/log/"
}
]
},
{
"name": "etcd",
"image": "microbox/etcd", // public image from docker hub
"essential": true,
"memory": 128,
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment