Flow-1: Pull Docker Image from Docker Hub and Run it
Step-1: Verify Docker version and also login to Docker Hub
docker version
docker login
Step-2: Pull Image from Docker Hub
docker pull stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
Step-3: Run the downloaded Docker Image & Access the Application
Copy the docker image name from Docker Hub
docker run --name app1 -p 80:8080 -d stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
http://localhost/hello
# For Mac with Apple Chips (use different application)
Step-1: Install Docker with Apple Chips binary (https://docs.docker.com/desktop/mac/install/) on your mac machine
Step-2: Run the simple Nginx Application container.
docker run --name kube1 -p 80:80 --platform linux/amd64 -d stacksimplify/kubenginx:1.0.0
http://localhost
## Sample Output
kalyanreddy@Kalyans-Mac-mini-2 ~ % docker run --name kube1 -p 80:80 --platform linux/amd64 -d stacksimplify/kubenginx:1.0.0
370f238d97556813a4978572d24983d6aaf80d4300828a57f27cda3d3d8f0fec
kalyanreddy@Kalyans-Mac-mini-2 ~ % curl http://localhost
<!DOCTYPE html>
<html>
<body style="background-color:lightgoldenrodyellow;">
<h1>Welcome to Stack Simplify</h1>
<p>Kubernetes Fundamentals Demo</p>
<p>Application Version: V1</p>
</body>
</html>%
kalyanreddy@Kalyans-Mac-mini-2 ~ %
Step-4: List Running Containers
docker ps
docker ps -a
docker ps -a -q
Step-5: Connect to Container Terminal
docker exec -it <container-name> /bin/sh
Step-6: Container Stop, Start
docker stop <container-name>
docker start <container-name>
docker stop <container-name>
docker rm <container-name>
docker images
docker rmi <image-id>