Sign inSign up

mohdtabish999/contact-ui

By mohdtabish999

•Updated over 6 years ago

Angular app contact UI

Image
0

63

mohdtabish999/contact-ui repository overview

⁠install docker using below script or installer package. create "install-docker.sh" file and paste below code.

#!/bin/bash
sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common 
curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add - 
sudo add-apt-repository \
    "deb https://apt.dockerproject.org/repo/ \
    ubuntu-$(lsb_release -cs) \
    main" 
sudo apt-get update
sudo apt-get -y install docker-engine 
sudo usermod -aG docker $(whoami)

⁠change file permission

sudo chmod 755 install-docker.sh
./install-docker.sh

⁠pull and run docker image

sudo docker pull mohdtabish999/contact-ui:0.1
sudo docker run -p 8080:9090 mohdtabish999/contact-ui:0.1
docker ps

⁠contact-ui will be deployed on docker on your local machine/localhost, To make it work on cloud you need to change "localhost" to "your-dns-name/public-ip".

follow below additional process on cloud.

sudo docker ps
sudo docker exec -it "your-container-id" sh
cd /usr/share/nginx/html

mv main-es5.a5c89c3bc0b58577b961.js ../
mv main-es2015.2311d7ddfeae4e5539e1.js ../
# replace with dns name
sed -i 's/localhost/<your-dns>/g' main-es5.a5c89c3bc0b58577b961.js
sed -i 's/localhost/<your-dns>/g' main-es2015.2311d7ddfeae4e5539e1.js

#move back to html foler
mv main-es2015.2311d7ddfeae4e5539e1.js ./html/
mv main-es5.a5c89c3bc0b58577b961.js ./html/

#Docker commit to create new image with modified files inside container
docker commit <container-id> <716523076871.dkr.ecr.eu-central-1.amazonaws.com/contact-ui:latest>
new image will be created with new tag

Tag summary

Content type

Image

Digest

Size

8.9 MB

Last updated

over 6 years ago

docker pull mohdtabish999/contact-ui:0.1