{"id":340,"date":"2023-08-08T09:09:07","date_gmt":"2023-08-08T15:09:07","guid":{"rendered":"https:\/\/kop.lat\/blog\/?p=340"},"modified":"2023-08-08T09:11:06","modified_gmt":"2023-08-08T15:11:06","slug":"run-and-stop-a-docker-container-in-windows-from-powershell","status":"publish","type":"post","link":"https:\/\/kop.lat\/blog\/run-and-stop-a-docker-container-in-windows-from-powershell\/","title":{"rendered":"[run] and [stop] a docker container in windows from powershell"},"content":{"rendered":"\n<p>the step of sintalling docker, is the same for everyone, navigate to &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\" target=\"_blank\">https:\/\/www.docker.com\/products\/docker-desktop\/<\/a>&#8221; and install.<\/p>\n\n\n\n<p>Once installed, log out and log back in into your user-session.<\/p>\n\n\n\n<p>Open powershell and clone the welcome-to-docker repo:<\/p>\n\n\n\n<p>git clone <a href=\"https:\/\/github.com\/docker\/welcome-to-docker\"><code>https:\/\/github.com\/docker\/welcome-to-docker<\/code><\/a><\/p>\n\n\n\n<p>navigate into the folder, and then type: <\/p>\n\n\n\n<p><code>docker build -t welcome-to-docker .<\/code><\/p>\n\n\n\n<p>This will build an image, based on the existing Dockerfile (typical file for docker images)<\/p>\n\n\n\n<p>To [run] the container:<\/p>\n\n\n\n<p><code>docker run -d -p 8088:80 --name welcome-to-docker docker\/welcome-to-docker<\/code><\/p>\n\n\n\n<p>In the browser, type: localhost:8088 and it should show the welcome screen.<\/p>\n\n\n\n<p>To [stop] the container:<\/p>\n\n\n\n<p><code>docker stop welcome-to-docker<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>the step of sintalling docker, is the same for everyone, navigate to &#8220;https:\/\/www.docker.com\/products\/docker-desktop\/&#8221; and install. Once installed, log out and log back in into your user-session. Open powershell and clone the welcome-to-docker repo: git clone https:\/\/github.com\/docker\/welcome-to-docker navigate into the folder, and then type: docker build -t welcome-to-docker . This will build an image, based on [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":233,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[39,41,47,46],"tags":[],"_links":{"self":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/340"}],"collection":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/comments?post=340"}],"version-history":[{"count":2,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/340\/revisions"}],"predecessor-version":[{"id":343,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/posts\/340\/revisions\/343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/media\/233"}],"wp:attachment":[{"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/media?parent=340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/categories?post=340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kop.lat\/blog\/wp-json\/wp\/v2\/tags?post=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}