{"id":18372,"date":"2017-08-23T12:15:56","date_gmt":"2017-08-23T09:15:56","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=18372"},"modified":"2017-08-24T14:11:18","modified_gmt":"2017-08-24T11:11:18","slug":"basics-docker-run-command","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/","title":{"rendered":"The Basics of the Docker Run Command"},"content":{"rendered":"<p>For many Docker enthusiasts, the <code>docker run<\/code> command is a familiar one. It\u2019s often the first Docker command we learn. The <code>docker run<\/code> command is the command used to launch Docker containers. As such, it\u2019s familiar to anyone starting or running Docker containers on a daily basis.<\/p>\n<p>In this article, we will get back to the basics and explore a few simple <code>docker run<\/code> examples. During these examples, we will use the standard <strong>redis<\/strong> container image to show various ways to start a container instance.<\/p>\n<p>While these examples may be basic, they are useful for anyone new to Docker.<\/p>\n<h2>Just Plain Ol\u2019 Docker Run<\/h2>\n<p>The first example is the most basic. We\u2019ll use the <code>docker run<\/code> command to start a single <strong>redis<\/strong> container.<\/p>\n<pre class=\" brush:bash\">$ docker run redis\r\n1:C 16 Jul 08:19:15.330 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server \/path\/to\/redis.conf\r\n<\/pre>\n<p>We can see that not only did we start the container, but we did so in \u201cattached\u201d mode. By default, if no parameters or flags are passed, Docker will start the container in \u201cattached\u201d mode. This means that the output from the running process is displayed on the terminal session.<\/p>\n<p>It also means that the terminal session has been hijacked by the running container, if we were to press <code>ctrl+c<\/code>, for example. We would then stop the <strong>redis<\/strong> service and as such stop the container.<\/p>\n<p>If we leave the terminal session alone and open another terminal session, we can execute the <code>docker ps<\/code> command. With this, we can see the container in a running status.<\/p>\n<pre class=\" brush:bash\">$ docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES\r\n1b83ac544e95        redis               \"docker-entrypoint...\"   2 minutes ago       Up 2 minutes        6379\/tcp            loving_bell\r\n<\/pre>\n<p>From the <code>docker ps<\/code> command above, we can see quite a bit about the running container, but one thing sticks out more than others. That is the name of the container: <code>loving_bell<\/code>.<\/p>\n<h2>Using the <code>--name<\/code> Parameter<\/h2>\n<p>By default, Docker will create a unique name for each container started. The names are generated from a list of descriptions (ie, \u201cboring\u201d or \u201chungry\u201d) and famous scientists or hackers (ie, Wozniak, Ritchie). It\u2019s possible however, to specify a name for our container. We can do so by simply using the <code>--name<\/code> parameter when executing <code>docker run<\/code>.<\/p>\n<pre class=\" brush:bash\">$ docker run --name redis redis\r\n1:C 16 Jul 08:22:17.296 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server \/path\/to\/redis.conf\r\n<\/pre>\n<p>In the above example, we used the <code>--name<\/code> parameter to start a <strong>redis<\/strong> container named <code>redis<\/code>. If we once again run the <code>docker ps<\/code> command, we can see that our container is running, this time with our specified name.<\/p>\n<pre class=\" brush:bash\">$ docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES\r\n67bbd0858ef5        redis               \"docker-entrypoint...\"   30 seconds ago      Up 27 seconds       6379\/tcp            redis\r\n<\/pre>\n<h3>Using <code>--name<\/code> to limit the number of containers running<\/h3>\n<p>The <code>--name<\/code> parameter is a useful option to know. Not only does naming a container make it easier to reference the container when executing Docker commands, but naming the container can also be used to control the number of containers that run on a single host.<\/p>\n<p>To explain this in a bit more detail, let\u2019s see what happens if we try to start another container named <strong>redis<\/strong> without stopping the previous <code>redis<\/code> container.<\/p>\n<pre class=\" brush:bash\">$ docker run --name redis redis\r\ndocker: Error response from daemon: Conflict. The container name \"\/redis\" is already in use by container \"67bbd0858ef5b1782875166b4c5e6c1589b28a99d130742a3e68f62b6926195f\". You have to remove (or rename) that container to be able to reuse that name.\r\n<\/pre>\n<p>We can see one very important fact about running containers: With Docker, you are not allowed to run multiple containers with the same name. This is useful to know if you need to run multiple instances of a single container.<\/p>\n<p>It is also useful to know this limitation if you wish to only run one instance of a specific container per host. A common use case for many users of Docker is to use the <code>--name<\/code> as a safety check against automated tools launching multiple Docker containers.<\/p>\n<p>By specifying a name within the automated tool, you are essentially ensuring that automated tools can only start one instance of the specified container.<\/p>\n<h2>Using -d to Detach the Container<\/h2>\n<p>Another useful parameter to pass to <code>docker run<\/code> is the <code>-d<\/code> flag. This flag causes Docker to start the container in \u201cdetached\u201d mode. A simple way to think of this is to think of <code>-d<\/code> as running the container in \u201cthe background,\u201d just like any other Unix process.<\/p>\n<p>Rather than hijacking the terminal and showing the application\u2019s output, Docker will start the container in detached mode.<\/p>\n<pre class=\" brush:bash\">$ docker run -d redis\r\n19267ab19aedb852c69e2bd6a776d9706c540259740aaf4878d0324f9e95af10\r\n$ docker run -d redis\r\n0f3cb6199d442822ecfc8ce6a946b72e07cf329b6516d4252b4e2720058c702b\r\n<\/pre>\n<p>The <code>-d<\/code> flag is useful when starting containers that you wish to run for long periods of time. Which, if you are using Docker to run services, is generally the case. In attached mode, a container is linked with the terminal session.<\/p>\n<p>Using <code>-d<\/code> is a simple way to detach the container on start.<\/p>\n<h2>Using -p to Publish Container Ports<\/h2>\n<p>In the examples above, all of our <strong>redis<\/strong> containers have been inaccessible for anything outside of the internal Docker service. The reason for this is because we have not published any ports to connect to <strong>redis<\/strong>. To publish a port via <code>docker run<\/code>, we simply need to add the <code>-p<\/code> flag.<\/p>\n<pre class=\" brush:bash\">$ docker run -d -p 6379:6379 --name redis redis\r\n2138279e7d29234defd2b9f212e65d47b9a0f3e422165b4e4025e466f25bbc2b\r\n<\/pre>\n<p>In the above example, we used the <code>-p<\/code> flag to publish the <strong>6379<\/strong> port from the host to the container to port <strong>6379<\/strong> within the container. This means anyone connecting to this host over port <strong>6379<\/strong> will be routed to the container via port <strong>6379<\/strong>.<\/p>\n<p>The syntax for this flag is <code>host_ip:host_port:container_port<\/code>, with the host IP being optional. If we wanted to see what ports were mapped on a previously running container, we can use the <code>docker ps<\/code> command.<\/p>\n<pre class=\" brush:bash\">$ docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES\r\n2138279e7d29        redis               \"docker-entrypoint...\"   22 seconds ago      Up 21 seconds       0.0.0.0:6379-&gt;6379\/tcp   redis<\/pre>\n<p>We can see that our host is listening across all interfaces (<code>0.0.0.0<\/code>) on port <strong>6379<\/strong>, and that traffic is being redirected to port <strong>6379<\/strong> within the container.<\/p>\n<p>Another useful tip regarding the <code>-p<\/code> flag is that you are able to specify it multiple times. This comes in handy if the container in question uses multiple ports.<\/p>\n<h2>Using -v to Mount Host Volumes<\/h2>\n<p>The last option we are going to explore is one that can be very important to anyone running containers that require persistent storage. This option is the <code>-v<\/code> flag.<\/p>\n<p>The <code>-v<\/code> flag is used to define volume mounts. Volume mounts are a way to share storage volumes across multiple containers. In the example below, we are sharing the <code>\/tmp\/data<\/code> directory on the host as <code>\/data<\/code> to the container.<\/p>\n<pre class=\" brush:bash\">$ docker run -d -p 6379:6379 --name redis -v \/tmp\/data:\/data redis\r\n23de16619b5983107c60dad00a0a312ee18e526f89b26a6863fef5cdc70c8426<\/pre>\n<p>The example above makes it to where anything written to <code>\/data<\/code> within the container is actually accessing <code>\/tmp\/data<\/code> on the host. The same is true of anything being written to <code>\/tmp\/data<\/code> on the host; that data will also be available within <code>\/data<\/code> in the container.<\/p>\n<p>We can see this if we look within the <code>\/tmp\/data<\/code> directory on the host.<\/p>\n<pre class=\" brush:bash\">$ ls \/tmp\/data\/\r\ndump.rdb<\/pre>\n<p>This option is important for anyone running a database or application that requires persistence within Docker.<\/p>\n<p>It is important, because any data that is written within the container is removed as soon as the container itself is removed. Essentially, if we were to simply spin up a <strong>redis<\/strong> instance without using volume maps, we could populate data within that redis instance. However, as soon as the container that hosts that instance is removed, the data within that <strong>redis<\/strong> instance is also removed.<\/p>\n<p>By using volume mounts, we can keep the data located on the host (as seen above), allowing any other <strong>redis<\/strong> container that uses that same volume mount to start where the previous container left off.<\/p>\n<h3>Performance implications of volume mounts<\/h3>\n<p>Another key aspect of volume mounts is that the write speed to a volume mount is far greater than the write speed within the container\u2019s filesystem. The reason for this is that the default container filesystem uses features such as thin provisioning and copy-on-write. These features can introduce latency for write-heavy applications.<\/p>\n<p>By using a host-based volume mount, the containerized application can achieve the same write speeds as the host itself.<\/p>\n<h2>Summary<\/h2>\n<p>In this article, we covered quite a few options for the <code>docker run<\/code> command. However, while these options are key, they only scratch the surface of the available options to <code>docker run<\/code>. Some of the options are complex enough to deserve an article unto themselves.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/blog.codeship.com\/the-basics-of-the-docker-run-command\/\">The Basics of the Docker Run Command<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Ben Cane at the <a href=\"http:\/\/blog.codeship.com\/\">Codeship Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command used to launch Docker containers. As such, it\u2019s familiar to anyone starting or running Docker containers on a daily basis. In this article, we will get back to &hellip;<\/p>\n","protected":false},"author":158,"featured_media":10356,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[217],"class_list":["post-18372","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>The Basics of the Docker Run Command - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command\" \/>\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\/basics-docker-run-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Basics of the Docker Run Command - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/\" \/>\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:published_time\" content=\"2017-08-23T09:15:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-08-24T11:11:18+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=\"Benjamin Cane\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin Cane\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/\"},\"author\":{\"name\":\"Benjamin Cane\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/4f5d918df9c19fab91b5b205357ce0b8\"},\"headline\":\"The Basics of the Docker Run Command\",\"datePublished\":\"2017-08-23T09:15:56+00:00\",\"dateModified\":\"2017-08-24T11:11:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/\"},\"wordCount\":1226,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#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\/basics-docker-run-command\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/\",\"name\":\"The Basics of the Docker Run Command - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"datePublished\":\"2017-08-23T09:15:56+00:00\",\"dateModified\":\"2017-08-24T11:11:18+00:00\",\"description\":\"For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#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\/basics-docker-run-command\/#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\":\"The Basics of the Docker Run Command\"}]},{\"@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\/4f5d918df9c19fab91b5b205357ce0b8\",\"name\":\"Benjamin Cane\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g\",\"caption\":\"Benjamin Cane\"},\"description\":\"Benjamin Cane is a systems architect in the financial services industry. He writes about Linux systems administration on his blog and has recently published his first book, Red Hat Enterprise Linux Troubleshooting Guide.\",\"url\":\"https:\/\/www.webcodegeeks.com\/author\/benjamin-cane\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Basics of the Docker Run Command - Web Code Geeks - 2026","description":"For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command","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\/basics-docker-run-command\/","og_locale":"en_US","og_type":"article","og_title":"The Basics of the Docker Run Command - Web Code Geeks - 2026","og_description":"For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command","og_url":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2017-08-23T09:15:56+00:00","article_modified_time":"2017-08-24T11:11:18+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":"Benjamin Cane","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Benjamin Cane","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/"},"author":{"name":"Benjamin Cane","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/4f5d918df9c19fab91b5b205357ce0b8"},"headline":"The Basics of the Docker Run Command","datePublished":"2017-08-23T09:15:56+00:00","dateModified":"2017-08-24T11:11:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/"},"wordCount":1226,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#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\/basics-docker-run-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/","url":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/","name":"The Basics of the Docker Run Command - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","datePublished":"2017-08-23T09:15:56+00:00","dateModified":"2017-08-24T11:11:18+00:00","description":"For many Docker enthusiasts, the docker run command is a familiar one. It\u2019s often the first Docker command we learn. The docker run command is the command","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/devops\/basics-docker-run-command\/#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\/basics-docker-run-command\/#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":"The Basics of the Docker Run Command"}]},{"@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\/4f5d918df9c19fab91b5b205357ce0b8","name":"Benjamin Cane","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09c6af2f1a7430456089189937094b817ef1b7c75ab9968bfd3ec35d938d914b?s=96&d=mm&r=g","caption":"Benjamin Cane"},"description":"Benjamin Cane is a systems architect in the financial services industry. He writes about Linux systems administration on his blog and has recently published his first book, Red Hat Enterprise Linux Troubleshooting Guide.","url":"https:\/\/www.webcodegeeks.com\/author\/benjamin-cane\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18372","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\/158"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=18372"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18372\/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=18372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=18372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=18372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}