BT

AWS Elastic Beanstalk Adds Preconfigured Docker Platform

| by Steffen Opel Follow 4 Followers on Nov 13, 2014. Estimated reading time: 2 minutes |

After gaining generic Docker support in July 2014, Amazon Web Services (AWS) now added "Preconfigured Docker" as a new category of supported platforms to its platform as a service offering AWS Elastic Beanstalk. This category of platforms is based on the recently added official repositories for language stacks on the Docker Hub Registry.

AWS references the ability to "quickly provide you with the newest versions of additional language/framework platforms" as a motivating factor for this addition. Users who are interested in basing their platforms on the official Docker language stacks are now able to "use our Dockerfile(s) as a starting point". AWS also emphasizes the desired dev/prod parity to "keep development and production as similar as possible":

The 'Preconfigured Docker'; platforms are delivered as Docker containers allowing you to develop and test your applications locally using the same container that your application will be deployed to on Elastic Beanstalk.

As usual, additional software components and application dependencies can be added by means of appropriate RUN statements in the Dockerfile. The example below illustrates "how to add PostgreSQL dependencies for your application when using the Python 3.4 platform":

# Use the Python 3.4 Docker Image
FROM amazon/aws-eb-python:3.4.2-onbuild-3.5.1

# Expose port 8080
EXPOSE 8080

# Install PostgreSQL dependencies
RUN apt-get update && \
    apt-get install -y postgresql libpq-dev && \
    rm -rf /var/lib/apt/lists

Similar to most other supported runtimes, the provisioned Elastic Beanstalk environment resources for preconfigured Docker containers can also be customized by means of configuration files to integrate additional AWS services like Amazon DynamoDB or Amazon Kinesis.

A getting started walkthrough illustrates the well-known simplicity of this Docker enabled development workflow. The resulting image can then be deployed like any other Docker container using the Elastic Beanstalk console or the recently updated Elastic Beanstalk command line interface. Additional deployment instructions can optionally be provided in the Elastic Beanstalk specific Dockerrun.aws.json configuration file.

AWS Elastic Beanstalk Environment SelectionInitially supported preconfigured Docker container types are Python 3.4, Java 7 GlassFish 4.0 and Java 8 GlassFish 4.1. While it seems conceivable that Elastic Beanstalk might switch to Docker as its default runtime one day, it's worth noting that the Java 8 Tomcat 8 stack released at the same time is still delivered as a dedicated container type rather than a preconfigured Docker container.

Amazon's Chief Evangelist Jeff Barr recently hinted towards a pleasant surprise regarding Docker usage on AWS to be revealed during the currently ongoing AWS re:Invent. More pronounced Docker support on AWS up to a dedicated service similar to Google's recently announced Kubernetes based Google Container Engine (GKE) might be revealed in Werner Vogels' keynote today (update: watch the Amazon EC2 Container Service (ECS) announcement at 45:27 into the keynote).

The Elastic Beanstalk documentation features a developer guide including a section on deploying preconfigured Docker containers and the API reference. The preconfigured Docker images are available on the Docker Hub and the source code can be accessed on GitHub. Support is provided via the Elastic Beanstalk forum.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT