Skip to content

Commit aec44d5

Browse files
Kalyan Reddy DaidaKalyan Reddy Daida
Kalyan Reddy Daida
authored and
Kalyan Reddy Daida
committed
Welcome to Stack Simplify
1 parent 8f93c6c commit aec44d5

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

00-Docker-Fundamentals/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,52 @@
22

33
## Flow-1: Pull existing Docker Image from Docker Hub and Run it as a Container
44

5+
#### Step-1: Verify Docker version and also login to Docker Hub
6+
```
7+
docker version
8+
docker login
9+
```
10+
11+
#### Step-2: Pull Image from Docker Hub
12+
```
13+
docker pull stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
14+
```
15+
16+
#### Step-3: Run the downloaded Docker Image & Access the Application
17+
- Copy the docker image name from Docker Hub
18+
```
19+
docker run -p 80:8080 -d stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
20+
http://localhost/hello
21+
```
22+
23+
#### Step-4: List Running Containers
24+
```
25+
docker ps
26+
docker ps -a
27+
docker ps -a -q
28+
```
29+
30+
#### Step-5: Connect to Container Terminal
31+
```
32+
docker exec -it <container-name> /bin/sh
33+
```
34+
35+
#### Step-6: Container Stop, Start
36+
```
37+
docker stop <container-name>
38+
docker start <container-name>
39+
```
40+
41+
#### Step-7: Remove Container
42+
```
43+
docker rm <container-name>
44+
```
45+
46+
### Step-8: Remove Image
47+
```
48+
docker image <image-id>
49+
```
50+
551
## Flow-2: Create a new Docker Image, Run as Container and Push to Docker Hub
652
#### Step-1: Run the base Nginx container
753
- Access the URL http://localhost

0 commit comments

Comments
 (0)