0194.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install Docker on Windows Server</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="How To,Tutorial,i12bretro,Docker,Windows,Windows Server,Installation,Powershell">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install Docker on Windows Server">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Install Docker on Windows Server</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Launch PowerShell as an administrator and run the following command:
  26. <div class="codeBlock">Install-WindowsFeature -Name Containers<br />
  27. Restart-Computer -Force</div>
  28. </li>
  29. <li>The server will reboot</li>
  30. <li>After logging back in, relaunch PowerShell and continue with the following commands:
  31. <div class="codeBlock">Install-Module -Name DockerMsftProvider -Repository PSGallery -Force<br />
  32. # Press Y to install the NuGet provider<br />
  33. Install-Package -Name docker -ProviderName DockerMsftProvider -Force<br />
  34. Start-Service docker<br />
  35. docker image pull mcr.microsoft.com/dotnet/core/aspnet:3.0<br />
  36. docker image pull mcr.microsoft.com/dotnet/core/sdk:3.0.100<br />
  37. docker container run -d -p 8080:80 sixeyed/whoami-dotnet:3.0</div>
  38. </li>
  39. <li>Open a web browser and navigate to http://localhost:8080</li>
  40. <li>To run another example container, execute the following in PowerShell
  41. <div class="codeBlock">docker run hello-world</div>
  42. </li>
  43. <li>Docker will download the hello-world container and execute it, displaying following output:
  44. <p>Hello from Docker!<br />
  45. This message shows that your installation appears to be working correctly.</p>
  46. <p>To generate this message, Docker took the following steps:<br />
  47. &nbsp;1. The Docker client contacted the Docker daemon.<br />
  48. &nbsp;2. The Docker daemon pulled the &quot;hello-world&quot; image from the Docker Hub.<br />
  49. &nbsp; &nbsp; (amd64)<br />
  50. &nbsp;3. The Docker daemon created a new container from that image which runs the<br />
  51. &nbsp; &nbsp; executable that produces the output you are currently reading.<br />
  52. &nbsp;4. The Docker daemon streamed that output to the Docker client, which sent it<br />
  53. &nbsp; &nbsp; to your terminal.</p>
  54. </li>
  55. </ol>
  56. </div>
  57. </div>
  58. </body>
  59. </html>