{"id":18167,"date":"2017-08-07T12:15:16","date_gmt":"2017-08-07T09:15:16","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=18167"},"modified":"2017-08-07T11:03:39","modified_gmt":"2017-08-07T08:03:39","slug":"docker-commands-development-deployment","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/","title":{"rendered":"Docker Commands for Development to Deployment"},"content":{"rendered":"<p>The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker commands needed for every action.<\/p>\n<h2>1 Introduction<\/h2>\n<p>The overall process consists of \u00a0i) <em>develop<\/em>\u00a0a container image with your code, dependent software and configurations, ii) <em>run<\/em>\u00a0and<em> test<\/em> the container in development environment, iii) <em>publish<\/em>\u00a0the container image into docker hub and finally \u00a0iv) deploy\u00a0the docker image and run the container in the target environment. \u00a0This article assumes that you have installed docker engine in the development and target environment. \u00a0Please refer <a href=\"https:\/\/docs.docker.com\/engine\/installation\/\">6.3<\/a> for installation instructions.<\/p>\n<h2>2 Develop Container Image<\/h2>\n<p>To build the container image, we have to create a Dockerfile which will contain all the necessary information. Please refer <a href=\"https:\/\/nodejs.org\/en\/docs\/guides\/nodejs-docker-webapp\/\">https:\/\/nodejs.org\/en\/docs\/guides\/nodejs-docker-webapp\/<\/a>\u00a0 to develop the Dockerfile.<\/p>\n<h3>2.1 Build docker container<\/h3>\n<pre class=\"brush:php\">$docker build -t containername .<\/pre>\n<p>The command will take the <strong><em>Dockerfile<\/em><\/strong> present in your current directory. \u00a0If you have the docker file in a different name and different location, we can use -f flag to specify the docker file name. \u00a0The \u201cdocker build\u201d command will build the container image in the name specified with \u201c-t\u201d flag.<\/p>\n<pre class=\"brush:php\">$docker build -t myapp .<\/pre>\n<h3><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/01-dockerbuild.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18171\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/01-dockerbuild.jpg\" alt=\"\" width=\"705\" height=\"461\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/01-dockerbuild.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/01-dockerbuild-300x196.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/h3>\n<h3>2.2 Docker Image Naming Convention<\/h3>\n<p>We can provide any name to a docker container, when you run locally. \u00a0It could be as simple as \u201cmyApp\u201d as shown above. \u00a0But if you want to publish the image into docker hub, there is a specific naming convention to be followed. \u00a0This convention helps the docker tools to publish the container image into right namespace and repository.<\/p>\n<p>The format:<\/p>\n<blockquote><p>NameSpace\/Repository:Version<\/p><\/blockquote>\n<p>So, I build the docker image using the above convention:<\/p>\n<pre class=\"brush:php\">$docker build -t saravasu\/techietweak:001 .<\/pre>\n<p>We can also use the \u201cdocker tag\u201d command to create a image from an existing image. \u00a0The \u201cdocker tag\u201d command is explained below.<\/p>\n<h3>2.3 List All Images in the Docker<\/h3>\n<pre class=\"brush:php\">$docker images<\/pre>\n<h2>\u00a0<a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/02-dockerimageslist1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18172\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/02-dockerimageslist1.jpg\" alt=\"\" width=\"705\" height=\"231\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/02-dockerimageslist1.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/02-dockerimageslist1-300x98.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/h2>\n<h2>3 Run the container<\/h2>\n<h3>3.1 Start the Docker Container<\/h3>\n<p>Use the \u201cdocker run\u201d command to start the docker container.<\/p>\n<pre class=\"brush:php\">$docker run -d -p 8080:8080 saravasu\/techietweak:001<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/03-dockerrun1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18173\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/03-dockerrun1.jpg\" alt=\"\" width=\"705\" height=\"169\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/03-dockerrun1.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/03-dockerrun1-300x72.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p>The \u201c-d\u201d option run the container in the detached mode, so that the container continues to run, even if the terminal is closed.<\/p>\n<p>The \u201c-p\u201d command used to map the ports. \u00a0In this example, \u201c-p 8080:8080\u201d the first port number is the port used the docker host. \u00a0The second port number is used by the docker container. \u00a0As per this command all the traffic comes to the docker host port, will be forwarded to the docker container port.<\/p>\n<h3>3.2 Check current running containers<\/h3>\n<pre class=\"brush:php\">$docker ps<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/07-dockerps.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18174\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/07-dockerps.jpg\" alt=\"\" width=\"705\" height=\"184\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/07-dockerps.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/07-dockerps-300x78.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p>From the above output, we can see that docker container is running in the name of \u201ctrusting_snyder\u201d<\/p>\n<p>To list all the containers irrespective of the states, use the \u201c-a\u201d switch.<\/p>\n<pre class=\"brush:php\">$docker ps -a<\/pre>\n<h3>3.3 Show the console logs of the running container<\/h3>\n<pre class=\"brush:php\">$docker logs &lt;containerName&gt;<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/08-dockerlogs.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18175\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/08-dockerlogs.jpg\" alt=\"\" width=\"705\" height=\"263\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/08-dockerlogs.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/08-dockerlogs-300x112.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p>ContainerName is can be found from \u201cdocker ps\u201d command<\/p>\n<h3>3.4 Login to the container<\/h3>\n<pre class=\"brush:php\">$docker exec -it containerId \/bin\/bash<\/pre>\n<p>The above command will prompt you with \u201cbash\u201d shell of the container.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/09-dockerlogin.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18176\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/09-dockerlogin.jpg\" alt=\"\" width=\"705\" height=\"375\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/09-dockerlogin.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/09-dockerlogin-300x160.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/09-dockerlogin-620x330.jpg 620w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<h3>3.5 \u00a0Stop the running container<\/h3>\n<pre class=\"brush:php\">$docker stop &lt;containername&gt;<\/pre>\n<h3><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerstop.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18177\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerstop.jpg\" alt=\"\" width=\"705\" height=\"206\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerstop.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerstop-300x88.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/h3>\n<h3>3.6 Remove the container image from the docker<\/h3>\n<pre class=\"brush:php\">$docker rm imageId<\/pre>\n<p>Note. \u00a0Find the imageId of the container using the command \u201cdocker images\u201d or \u201cdocker images -a \u201d<\/p>\n<pre class=\"brush:php\">$docker rmi -f &lt;List Of Image Ids&gt;<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerrmiimages.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18178\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerrmiimages.jpg\" alt=\"\" width=\"705\" height=\"399\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerrmiimages.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/11-dockerrmiimages-300x170.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p>The above command will forcefully delete the given image.<\/p>\n<h3>3.7 \u00a0Clean up your docker \/ Delete All container images in the local docker<\/h3>\n<pre class=\"brush:php\">$docker rmi -f $(docker images | tr -s ' ' ' ' | cut -d' ' -f3)<\/pre>\n<h2>4 Publish The Container Image<\/h2>\n<p>The docker container images can be published to your local dockyard or the public docker hub. \u00a0The process and commands are same for both. \u00a0To publish your docker image in the docker hub, first create your namespace and repository in the <a href=\"http:\/\/hub.docker.com\" rel=\"nofollow\">http:\/\/hub.docker.com<\/a>.<\/p>\n<p>I have used my namespace \u201csaravasu\u201d and the repository \u201ctechietweak\u201d for this exercise.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/00-dockerhubrepo.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18179\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/00-dockerhubrepo.jpg\" alt=\"\" width=\"705\" height=\"458\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/00-dockerhubrepo.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/00-dockerhubrepo-300x195.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<h3>4.1 Login To Docker Hub<\/h3>\n<pre class=\"brush:php\">$docker login<\/pre>\n<p>If you want to login to you local repository, please provide the URL. \u00a0If URL is not specified, then this command will login to docker hub.<\/p>\n<pre class=\"brush:php\">$docker login http:\/\/localhost:8080<\/pre>\n<h3><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/04-dockerlogin.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18180\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/04-dockerlogin.jpg\" alt=\"\" width=\"705\" height=\"259\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/04-dockerlogin.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/04-dockerlogin-300x110.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/h3>\n<h3>4.2 Tag The Container Image<\/h3>\n<p>To push the docker container image into docker hub, it must be tagged in a specific format.<\/p>\n<p>It is &lt;Namespace&gt;\/&lt;Repository&gt;:&lt;Version&gt; . \u00a0If you don\u2019t specify the version, it will be taken as \u201cdefault\u201d. \u00a0In the below command, I am tagging the image \u201cmyapp\u201d , as \u201csaravasu\/techietweak:001\u201d, where as \u201csaravasu\u201d is my namespace (login id), techietweak is repository and 001 is the version.<\/p>\n<pre class=\"brush:php\">$docker tag myapp:latest saravasu\/techietweak:001<\/pre>\n<h3>4.3 Push the docker image into docker hub<\/h3>\n<pre class=\"brush:php\">$docker push saravasu\/techietweak:001<\/pre>\n<h3><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/10-dockerpushtodockerhub.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18181\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/10-dockerpushtodockerhub.jpg\" alt=\"\" width=\"705\" height=\"412\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/10-dockerpushtodockerhub.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/10-dockerpushtodockerhub-300x175.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/h3>\n<h3>4.4 Check the Container Images in Docker Hub<\/h3>\n<p>Now login to you docker hub account and check for the images in the respective repository.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/05-dockerhubimages1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18182\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/05-dockerhubimages1.jpg\" alt=\"\" width=\"705\" height=\"397\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/05-dockerhubimages1.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/05-dockerhubimages1-300x169.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<h2>5 Deploy The Container<\/h2>\n<h3>5.1 Pull The Docker Container Image<\/h3>\n<p>Login into docker hub from the host machine in the target environment and pull the container image from docker hub. \u00a0If you want pull it from your private dockyard use the command \u201c$docker login &lt;hostname&gt;\u201d to specify the hostname the private dockyard.<\/p>\n<pre class=\"brush:php\">$docker login<\/pre>\n<p>The above command will login to <a href=\"https:\/\/hub.docker.com\" rel=\"nofollow\">https:\/\/hub.docker.com<\/a>, since the host name is not specified.<\/p>\n<pre class=\"brush:php\">$docker pull saravasu\/techietweak:001<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/12-dockerpull.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18183\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/12-dockerpull.jpg\" alt=\"\" width=\"705\" height=\"447\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/12-dockerpull.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/12-dockerpull-300x190.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<h3>5.2 Check the image<\/h3>\n<p>The docker pull command downloaded the container image from the docker hub. We can validate the same by using \u201cdocker images\u201d command.<\/p>\n<pre class=\"brush:php\">$docker images<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/06-dockerpull-images1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18184\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/06-dockerpull-images1.jpg\" alt=\"\" width=\"705\" height=\"145\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/06-dockerpull-images1.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/06-dockerpull-images1-300x62.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<h3>5.3 Run the container<\/h3>\n<p>Now we can run the Docker Container, in the same way we ran in the development environment and test in the same way we have done it before.<\/p>\n<pre class=\"brush:php\">$docker run -d -p 8080:8080 saravasu\/techietweak:001<\/pre>\n<h2><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/13-dockertargetrun.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18185\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/13-dockertargetrun.jpg\" alt=\"\" width=\"705\" height=\"192\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/13-dockertargetrun.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/13-dockertargetrun-300x82.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/h2>\n<p>The docker run command starts the container. \u00a0To validate the same, we can use \u201cdocker ps\u201d command. \u00a0The docker has created a new container and it is running in the name of \u201cnaughty_lewin\u201d.<\/p>\n<p>As we see above, the docker engine provides a random name to the running container. \u00a0But this could be a problem in automation, so it is always good to specify a name we want to refer. \u00a0This can be achieved by using \u201c\u2013name\u201d parameter.<\/p>\n<pre class=\"brush:php\">$docker run -d -p 8080:8080 --name \"myNodeJsWebContainer\" saravasu\/techietweak:001<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/14-dockerrunnamedcontainer.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18186\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/14-dockerrunnamedcontainer.jpg\" alt=\"\" width=\"705\" height=\"216\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/14-dockerrunnamedcontainer.jpg 705w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/08\/14-dockerrunnamedcontainer-300x92.jpg 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<h2>6 Summary<\/h2>\n<p>This article captures over all flow and necessary commands to develop the container image, run it in local environment, publish the image to docker hub and run the container in the target environment. \u00a0For further study and detailed documentation is available in docker website [Ref 6.1].<\/p>\n<h2>7 References<\/h2>\n<ul>\n<li>7.1 Dockerfile Reference <a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\/\">https:\/\/docs.docker.com\/engine\/reference\/builder\/<\/a><\/li>\n<li>7.2 Dockerize Node.js Web App\u00a0<a href=\"https:\/\/nodejs.org\/en\/docs\/guides\/nodejs-docker-webapp\/\">https:\/\/nodejs.org\/en\/docs\/guides\/nodejs-docker-webapp\/<\/a><\/li>\n<li>7.3 Docker Installation :\u00a0<a href=\"https:\/\/docs.docker.com\/engine\/installation\/\">https:\/\/docs.docker.com\/engine\/installation\/<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/techietweak.wordpress.com\/2017\/08\/07\/docker-commands-for-development-to-deployment\/\">Docker Commands for Development to Deployment<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Saravanan Subramanian at the <a href=\"http:\/\/techietweak.wordpress.com\/\">Saravanan Subramanian Tech Notes<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker commands needed for every action. 1 Introduction The overall process consists of \u00a0i) develop\u00a0a container image with your code, dependent software and configurations, ii) run\u00a0and test the container in development &hellip;<\/p>\n","protected":false},"author":143,"featured_media":10356,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[217],"class_list":["post-18167","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-docker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker Commands for Development to Deployment - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker Commands for Development to Deployment - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/saravanan.subramanian.31\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-07T09:15:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Saravanan Subramanian\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tosarvan\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saravanan Subramanian\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\"},\"author\":{\"name\":\"Saravanan Subramanian\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a\"},\"headline\":\"Docker Commands for Development to Deployment\",\"datePublished\":\"2017-08-07T09:15:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\"},\"wordCount\":1005,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"keywords\":[\"Docker\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\",\"name\":\"Docker Commands for Development to Deployment - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"datePublished\":\"2017-08-07T09:15:16+00:00\",\"description\":\"The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Docker Commands for Development to Deployment\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a\",\"name\":\"Saravanan Subramanian\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g\",\"caption\":\"Saravanan Subramanian\"},\"description\":\"Saravanan Subramanian is a System Architect cum Agile Product Owner for developing cloud based applications for service provider back office enterprise applications using open source technologies. He is passionate about Cloud Technology and Big Data Analytics.\",\"sameAs\":[\"http:\/\/techietweak.wordpress.com\/\",\"https:\/\/www.facebook.com\/saravanan.subramanian.31\",\"https:\/\/in.linkedin.com\/in\/tosarvan\",\"https:\/\/x.com\/tosarvan\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/saravanan-subramanian\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker Commands for Development to Deployment - Web Code Geeks - 2026","description":"The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/","og_locale":"en_US","og_type":"article","og_title":"Docker Commands for Development to Deployment - Web Code Geeks - 2026","og_description":"The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker","og_url":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/saravanan.subramanian.31","article_published_time":"2017-08-07T09:15:16+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Saravanan Subramanian","twitter_card":"summary_large_image","twitter_creator":"@tosarvan","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Saravanan Subramanian","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/"},"author":{"name":"Saravanan Subramanian","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a"},"headline":"Docker Commands for Development to Deployment","datePublished":"2017-08-07T09:15:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/"},"wordCount":1005,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","keywords":["Docker"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/","url":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/","name":"Docker Commands for Development to Deployment - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","datePublished":"2017-08-07T09:15:16+00:00","description":"The objective of this article to understand the end to end flow of container development to deployment in target environment and list down the docker","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/devops\/docker-commands-development-deployment\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.webcodegeeks.com\/category\/devops\/"},{"@type":"ListItem","position":3,"name":"Docker Commands for Development to Deployment"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/56779276fba995e603f50ea6f18bdd8a","name":"Saravanan Subramanian","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d5b5095370698b8a3f2dfd7ade5444c1b7ec66ed3f549b8a9dcda5580c3a80dd?s=96&d=mm&r=g","caption":"Saravanan Subramanian"},"description":"Saravanan Subramanian is a System Architect cum Agile Product Owner for developing cloud based applications for service provider back office enterprise applications using open source technologies. He is passionate about Cloud Technology and Big Data Analytics.","sameAs":["http:\/\/techietweak.wordpress.com\/","https:\/\/www.facebook.com\/saravanan.subramanian.31","https:\/\/in.linkedin.com\/in\/tosarvan","https:\/\/x.com\/tosarvan"],"url":"https:\/\/www.webcodegeeks.com\/author\/saravanan-subramanian\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/143"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=18167"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18167\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/10356"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=18167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=18167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=18167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}