Docker Community Forums

Share and learn in the Docker community.

Docker for AWS git support

I’m not sure if this is the best place for it, but I was wondering what people’s approach to deploying Docker for AWS with other cloudformation resources is.

For example, if I wanted to deploy an RDS database along with my Docker stack I have to options:

  1. Copy the Docker for AWS cloudformation template and add new cloudformation resources, or
  2. Create a new stack that runs alongside the Docker for AWS stack.

One issue with #2 is I need to export a number of values, such as the VPC id and Security Group Ids in order for the new cloudformation stack to reference the docker stack, which also means modifying the original template (although not as much).

The issue with modifying the Docker for AWS template is that I then lose the ability to merge in upstream changes, and have to support or manually merge any further changes to the official Docker for AWS template. One option around this would be to expose the Docker for AWS cloudformation template on git, which would allow for customisation and merging in upstream changes. (Perhaps this does exist, but I couldn’t find anywhere, but perhaps I didn’t try hard enough).

So my question is: What is the canonical way to combine Docker for AWS with AWS resources in cloudformation?

Can you not use the variant of the Docker for AWS template that lets you use an existing VPC? Then you can configure Docker for AWS in the same VPC as your RDS database: https://docs.docker.com/docker-for-aws/#docker-community-edition-ce-for-aws