Posts

Opening instance ports

Sometimes your docker image uses different ports. That you could connect to your special container ports you have to add them to instance role. select running instance : click Services -> EC2 -> "Running Instances".  select instance and click on link at "Security groups" click tab "Inbound" "Edit" -> "Add rule" : Insert your special port for source , TCP and Save You don't need to restart image.

Connecting to running docker image AWS Amazon

open SSH port 22: select running instance : click Services -> EC2 -> "Running Instances".  select instance and click on link at "Security groups" click tab "Inbound" "Edit" -> "Add rule" : Insert port 22 for source anywhere, TCP and Save select running instance : click Services -> EC2 -> "Running Instances" click "Running Instances" and select it to connect click "Connect" to connect over explorer click "A Java SSH ..."  -> IE only to connect using SSH tool (Putty) follow rules copy instance "Public DNS (IPv4)" address open Putty: Host: ec2-user@"Public DNS (IPv4)" address Port: 22 Connection -> SSH -> Auth -> Private key : locate your private key (must be in Services->EC2->Key Pairs) once you are in you have all docker commands. $ docker ps (running containers) $ docker exec -ti conteinerid /bin/bash (connect to root)  ...

Running docker image on Amazon AWS

(optional) to connect to the cluster (running instance) you have to create security keys. to create them go to: click Services -> EC2 in left menu select "Key pairs" (NETWORK & SECURITY) click "Create key pair" and the keys are created copy created key content to your computer and store them properly (store private key) create Cluster : click Services -> Elastic Container Service -> Clusters -> Create Cluster name your cluster  select EC2 instance type for your purpose (free is only t2.micro) select key pair if you would like to connect to cluster over SSH (optional but it is recommended) click Create create task role to use it in creating new task: click Services -> IAM in left menu select "Roles"  and "Create Role" trusted entity: select "EC2 Container Service" -> "EC2 Container Service Task"  and click Next click Next  name role and create it create Task Definition: click Servic...

Deploy docker image to Amazon AWS (free for 12months) in half an hour for beginners

After success registration in AWS you can start using it. 1. Create secret keys ... Go to https://console.aws.amazon.com/iam/home?#/security_credential and create keys, you will need them for logging in local docker, ... 2. Create "EC2 Container Service" In "Repositories" create your new repository. When you create it you will get commands for docker and was for your repository - click "View push command" (sample code) 3. Install AWS client in local computer. There you must have docker installed to. Installation: http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html#install-msi-on-windows 4. Run docker client (local computer). In cmd run: $ aws configure (you enter credentials from Access keys ...) $ aws ecr get-login --no-include-email --region eu-central-1  (you use your location, look in your sample for running) You run what you will get in response like: docker login -u AWS -p eyJwY................ $ docker tag...