Dockerizing Spring Boot in AWS Notes
Dockerizing Spring Boot in AWS Notes
1
Spring-Boot Docker AWS
3
docker build -t employee-app . --platform linux/x86_64
f7435dfa5193
[email protected]
fi
Connecting EC2 Instance & Installing Docker
create new ec-instance default
connect to ec2-instance via SSH tool
sudo su - [to switch to root user]
yum install docker
cat /etc/group [how many software groups are there for
root user]
usermod -aG docker ec2-user [giving group permission to user
for accessing docker]
sudo su ec2-user
sudo systemctl status docker [check if docker engine is started]
sudo systemctl start docker [or] sudo service docker start [start the
docker engine]
sudo systemctl status docker [now again check the status of the
docker engine]
sudo systemctl stop docker [to stop the docker]
[email protected]
Pushing The Image To Docker HUB & Pull
Run this command to end all Docker containers: sudo docker kill $
(docker ps -q)
[email protected]
fi
EC2 Instance Inbound Rule Settings