Deploy Docker Image using Elastic Beanstalk

First create a file docker-eb-run.json with following content

{
    "AWSEBDockerrunVersion": "1",
    "Image": {
        "Name": "bitnami/tomcat"
    },
    "Ports": [
        { "ContainerPort": "8080" }
    ]
}

here i used docker container bitnami/tomcat, you can use any container.

Login to AWS Console, go to AWS Elastic Beanstalk page. Click Get Started.

On next page, it ask for

Application Name  = put anything you like here
Platform = Docker

For Application code, select Upload your code, click upload button and select “docker-eb-run.json” file you created.

Click “Create application” button. AWS will start deploying your docker container in Elastic Beanstalk, it will take a few minutes to complete.

Once deployment is completed, you get URL like

http://serveroktest-env.ap7uahtfyh.ap-south-1.elasticbeanstalk.com

aws

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *