Sign inSign up

dvladnik/postgres-ebs

By dvladnik

Updated almost 11 years ago

Postgres with automatic EBS mount in ECS cluster

Image
1

100K+

dvladnik/postgres-ebs repository overview

Postgres container with EBS auto-mount

docker run -d --privileged -v /etc/ecs:/ecs sdvladnik/postgres-ebs

How it works:

  1. Finds available EBS volume with tag Name=$ECS_CLUSTER-$CONTAINER;
  2. Finds free device name and attaches EBS to host machine as a new device;
  3. Mounts volume directly into Docker container and starts Postgres database;
  4. Intercepts container stop command, unmounts and detaches EBS volume and makes it available for other container to use

Requires additional instance role permissions and privileged mode:

  • ec2:AttachVolume
  • ec2:DetachVolume
  • ec2:DescribeVolumes

Tag summary

Content type

Image

Digest

sha256:e955f6c92

Size

124.8 MB

Last updated

almost 11 years ago

docker pull dvladnik/postgres-ebs