File tree 1 file changed +8
-1
lines changed
04-Build-new-Docker-Image-and-Run-and-Push-to-DockerHub 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Flow-2: Create a new Docker Image, Run as Container and Push to Docker Hub
2
2
3
+ ## Pre-requisite Step
4
+ - Create your Docker hub account.
5
+ - https://hub.docker.com/
6
+ - ** Important Note** : In the below listed commands wherever you see ** stacksimplify** you can replace with your docker hub account id.
7
+
8
+
3
9
## Step-1: Run the base Nginx container
4
10
- Access the URL http://localhost
5
11
```
@@ -16,6 +22,7 @@ COPY index.html /usr/share/nginx/html
16
22
17
23
## Step-3: Build Docker Image & run it
18
24
```
25
+ docker build -t <your-docker-hub-id>/mynginx_image1:v1 .
19
26
docker build -t stacksimplify/mynginx_image1:v1 .
20
27
docker run --name mynginx1 -p 80:80 -d stacksimplify/mynginx_image1:v1
21
28
```
@@ -27,5 +34,5 @@ docker tag stacksimplify/mynginx_image1:v1 stacksimplify/mynginx_image1:v1-relea
27
34
docker push stacksimplify/mynginx_image1:v1-release
28
35
```
29
36
## Step-5: Verify the same on docker hub
30
- - Login to docker hub
37
+ - Login to docker hub and verify the image we have pushed
31
38
- Url: https://hub.docker.com/repositories
You can’t perform that action at this time.
0 commit comments