From c1b0c9eb81dd627479af2413ef61ad38ed78dfb9 Mon Sep 17 00:00:00 2001 From: Kalyan Reddy Daida <kdaida@Kalyans-MacBook-Pro.local> Date: Sat, 15 Feb 2020 15:46:35 +0530 Subject: [PATCH] Welcome to Stack Simplify --- .../README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/04-Build-new-Docker-Image-and-Run-and-Push-to-DockerHub/README.md b/04-Build-new-Docker-Image-and-Run-and-Push-to-DockerHub/README.md index d6c3da8..d3a63a7 100644 --- a/04-Build-new-Docker-Image-and-Run-and-Push-to-DockerHub/README.md +++ b/04-Build-new-Docker-Image-and-Run-and-Push-to-DockerHub/README.md @@ -11,6 +11,7 @@ ``` docker run --name mynginxdefault -p 80:80 -d nginx docker ps +docker stop mynginxdefault ``` ## Step-2: Create Dockerfile and copy our customized index.html @@ -22,9 +23,12 @@ COPY index.html /usr/share/nginx/html ## Step-3: Build Docker Image & run it ``` -docker build -t <your-docker-hub-id>/mynginx_image1:v1 . docker build -t stacksimplify/mynginx_image1:v1 . docker run --name mynginx1 -p 80:80 -d stacksimplify/mynginx_image1:v1 + +Replace your docker hub account Id +docker build -t <your-docker-hub-id>/mynginx_image1:v1 . +docker run --name mynginx1 -p 80:80 -d <your-docker-hub-id>/mynginx_image1:v1 ``` ## Step-4: Tag & push the Docker image to docker hub @@ -32,6 +36,10 @@ docker run --name mynginx1 -p 80:80 -d stacksimplify/mynginx_image1:v1 docker images docker tag stacksimplify/mynginx_image1:v1 stacksimplify/mynginx_image1:v1-release docker push stacksimplify/mynginx_image1:v1-release + +Replace your docker hub account Id +docker tag <your-docker-hub-id>/mynginx_image1:v1 <your-docker-hub-id>/mynginx_image1:v1-release +docker push <your-docker-hub-id>/mynginx_image1:v1-release ``` ## Step-5: Verify the same on docker hub - Login to docker hub and verify the image we have pushed