Posts

Showing posts from December, 2017

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...