#!/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)
sudo chmod 755 install-docker.sh
./install-docker.sh
sudo docker pull mohdtabish999/contact-ui:0.1
sudo docker run -p 8080:9090 mohdtabish999/contact-ui:0.1
docker ps
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
Content type
Image
Digest
Size
8.9 MB
Last updated
over 6 years ago
docker pull mohdtabish999/contact-ui:0.1