File tree 1 file changed +46
-0
lines changed 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Flow-1: Pull existing Docker Image from Docker Hub and Run it as a Container
4
4
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
+
5
51
## Flow-2: Create a new Docker Image, Run as Container and Push to Docker Hub
6
52
#### Step-1: Run the base Nginx container
7
53
- Access the URL http://localhost
You can’t perform that action at this time.
0 commit comments