在windows(阿里雲ECS)上安裝docker
阿新 • • 發佈:2021-01-02
前言
這是一臺阿里雲ECS,Windows server 2019
嘗試開啟HyperV並安裝Docker Desktop,但是不行,因為阿里雲不支援二次虛擬化
安裝
Docker一鍵安裝器
DockerMsftProvider
PS C:\Users\Administrator> Install-Module -Name DockerMsftProvider -Repository PSGallery -Force NuGet provider is required to continue PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Doyou want PowerShellGet to install and import the NuGet provider now? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y PS C:\Users\Administrator>
執行安裝
PS C:\Users\Administrator> Install-Package -Name docker -ProviderName DockerMsftProvider The package(s) come(s) from a package source that is not marked as trusted. Are you sure you want to install software from 'DockerDefault'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y Name Version Source Summary ---- ------- ------ ------- Docker 19.03.14 DockerDefault Contains Docker EE for use with Windows Server. PS C:\Users\Administrator> PS C:\Users\Administrator>
重啟系統
Restart-Computer -Force
驗證
執行個docker命令,如docker search
PS C:\Users\Administrator> docker search nginx NAME DESCRIPTION STARS OFFICIAL AUTOMATED nginx Official build of Nginx. 14242 [OK] jwilder/nginx-proxy Automated Nginx reverse proxy for docker con… 1933 [OK] richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable of… 798 [OK] linuxserver/nginx An Nginx container, brought to you by LinuxS… 138 jc21/nginx-proxy-manager Docker container for managing Nginx proxy ho… 127 tiangolo/nginx-rtmp Docker image with Nginx using the nginx-rtmp… 108 [OK] bitnami/nginx Bitnami nginx Docker Image 93 [OK] alfg/nginx-rtmp NGINX, nginx-rtmp-module and FFmpeg from sou… 86 [OK] jlesage/nginx-proxy-manager Docker container for Nginx Proxy Manager 77 [OK] nginxdemos/hello NGINX webserver that serves a simple page co… 65 [OK] nginx/nginx-ingress NGINX Ingress Controller for Kubernetes 46 privatebin/nginx-fpm-alpine PrivateBin running on an Nginx, php-fpm & Al… 44 [OK] nginxinc/nginx-unprivileged Unprivileged NGINX Dockerfiles 27 schmunk42/nginx-redirect A very simple container to redirect HTTP tra… 19 [OK] staticfloat/nginx-certbot Opinionated setup for automatic TLS certs lo… 16 [OK] centos/nginx-112-centos7 Platform for running nginx 1.12 or building … 15 nginx/nginx-prometheus-exporter NGINX Prometheus Exporter 15 raulr/nginx-wordpress Nginx front-end for the official wordpress:f… 13 [OK] centos/nginx-18-centos7 Platform for running nginx 1.8 or building n… 13 flashspys/nginx-static Super Lightweight Nginx Image 8 [OK] mailu/nginx Mailu nginx frontend 8 [OK] bitnami/nginx-ingress-controller Bitnami Docker Image for NGINX Ingress Contr… 7 [OK] bitwarden/nginx The Bitwarden nginx web server acting as a r… 7 ansibleplaybookbundle/nginx-apb An APB to deploy NGINX 1 [OK] wodby/nginx Generic nginx 1 [OK] PS C:\Users\Administrator>