i'm using Ubuntu 16.04 and installed docker on my machine and created 2 Hello World ruby on rails web application images.

The first one say **"Hello World"**, and the second say **"Howdy World"**.   

Ran both containers in parallel on my local machine, on different ports using the localhost.

Created a free AWS account, set up a VPC with a public subnet and spine up an EC2 instance with a public security group and created the relevant ssh credentials.

When I try to deploy the images to GitHub by pushing, the first one pushed fine, then second one however **doesn't seems to work** because I keep getting this

**error**  

`Updates were rejected because the tip of your current branch is behind it's remote counterpart. integrate the remote changes (git pull...) before pushing again`

after that I need to somehow run these 2 applications on the EC2 machine
(succeeded in connecting to the machine via Ubuntu terminal but got stuck since then) so I could give it a public IP and with it's port, to and see them from any device that I connect.

Any help will be appreciated ?