You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

Currently, the way Docker containers are deployed on AWS is basically having them run on an EC2 instance (with public IP 3.87.30.85). This means that each service occupies a unique port on the machine. Below is a list of running services and the ports they are using.

ServicePort
Backend offline5000

 

Procedure

To deploy a Docker, there are three steps:

  1. copy your Docker image and other relevant file to the EC2 instance using scp
  2. ssh into the EC2 instance
  3. run your Docker image there

Copy files 

First, download the key pair file DIAPER-test-key.pem and copy your Docker image and other relevant file to the EC2 instance using scp:

scp -r -i DIAPER-test-key.pem /path/to/project/folder ec2-user@3.87.30.85:~/

Then,  ssh into the EC2 instance using

ssh -i DIAPER-test-key.pem ec2-user@3.87.30.85

Once logged in, navigate to the project folder you just uploaded and run the Docker as you would do locally. If your service is blocking, do the following

ctrl-z
bg
disown -h

Then you can logout and the service will continue running on the EC2 instance.

  • No labels