Tag: amazon web services

Docker EC2 & port binding

I have an Ubuntu EC2 instance. Have current version of Docker installed. Running a Jenkins container on the EC2 host. The Docker run command I am using is: docker run \ -d \ -p 9000:8080 \ -p 5000:5000 \ -v /var/run/docker.sock:/var/run/docker.sock \ jenkinsci/jenkins The command completes successfully and my container has started. If I SSH […]

Setting up credentials for docker and AWS windows

I’m attempting to set up a docker-machine on AWS from my computer and I want to use the ~/.aws/credentials file to connect and get going. I’m struggling to sort this out though. Can I check the structure of the credentials file. I’m expecting to include the following text: [default] aws_access_key_id = key-pair-name-from-ec2-key-pair-list aws_secret_access_key = <this […]

aws cli cannot read from dynamodb docker container

i am running dynamodb on a docker container and am able to write to the table using python boto3, which is all fine and good. now when I query the dynamodb table from outside the container using aws CLI, its give this error and cannot find the table ╰─➤ aws dynamodb –region=eu-west-1 –endpoint-url http://localhost:8000 scan […]

Updating rather than replacing ECS Task Definition with CloudFormation

When updating a TaskDefinition in CloudFormation the docs say that a replacement action occurs – http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html Is there a way to get that to be a new revision? Should I be using the family parameter? Is there a TaskDefinition limit? Otherwise I end up with a large number of inactive definitions. ContainerDefinitions: – Name: container […]

Using pm2 Inside of an Auto-Scaling Environment

I am planning to use the AWS EC2 Container Service to host an auto-scaling group of Node.js + Express instances that expose a REST API. I’ve seen multiple articles telling me that I should be using pm2 over forever.js in order to ensure that my application restarts if it crashes, that I can have smooth […]

How to update docker version in AWS ECS

I intend to run some apps stateful in only 1 container instance in ECS, no config autoscaling. My purpose when running this container instance in ECS is find an easy way to update docker version by support of ECS. But seen like to update docker version in ECS, I have to launch a new instance […]

Docker application upload on AWS elastic beanstalk fails

I am using docker images for running web-app on PHP and MongoDB. Docker container is running perfectly on my local machine (Windows10) but it is not updating on AWS Elastic Beanstalk. I have made a zipped file consist of run.sh, Dockerfile, and Dockerrun.aws.json which can be found from here. On AWS Elastic Beanstalk I am […]

What is the difference between running an application on ec2-server and running an application on top of docker on ec2-server?

Lets say we have a war file. I am going to deploy it on AWS. I can install tomcat ,etc and deploy it directly on the ec2-instance. I can install docker and install everything in the container and deploy it. What is the difference ? when should I use what?

How to make redis BROKER_URL dynamic on deployment to AWS instance

I’m deploying a Django app which uses celery task and has redis as the broker backend. I’m using docker for deployment and my production server is an amazon aws instance. The problem I’m facing is that the django settings is different for localhost: BROKER_URL = ‘redis://localhost:6379’ CELERY_RESULT_BACKEND = ‘redis://localhost:6379’ and all my unit tests work. […]

ECS CLI – Mount EFS when launching container instance

I am using the ecs-cli with a docker compose file and parameters defining my keypair, VPC, subnet, security groups, AMI etc… However, the containers that run on the instance will need access to my EFS. So when ECS has a launched a new container instance, I want it to mount the EFS at a specific […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.