惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - tubo

依赖Asp.net Core的类库 找一款可以插入数学公式的思维导图软件 联想个人云开启Docker并安装常用的Docker 联想个人云无损开启SSH Gerrit 添加用户 Windows 10 安装过程中,在自定义登录页面进入审核模式 mac远程桌面连接windows 8.1 update,提示: 远程桌面连接无法验证您希望连接的计算机的身份 iOS开发点滴:iPhone屏幕适配 C# Winform中如何让PictureBox的背景透明 ExtJS扩展:扩展grid之toolbar button禁用表达式 ExtJS扩展:扩展grid Extjs扩展:封装Plupload 用NuGet管理程序包时,如果解决方案目录下的packages文件夹中某一个程序包存在2个以上的版本,则会提示错误 User Profile Service服务未登录,无法加载用户配置文件 可动态构造查询条件的表达式类库(1) Windows 8安装杀毒软件avast后,不能用Sysprep进行通用化封装 Nuget 启用数据库迁移的时候一定要把包含DbContext的项目设为启动项目 “PostSharp21”任务意外失败 为什么TFS会自动签出解决方案文件(.sln)?
我只想在Windows Server 2019上build 基于Linux的Docker
tubo · 2020-01-11 · via 博客园 - tubo

周末回家忘了带笔记本电源,电源耗尽,只能在家里的Windows Server 2019上继续工作,而当我在Windows Server 2019中用Docker Build我的Docker镜像的时候,出现如下错误:

Using default tag: latest
latest: Pulling from library/node
no matching manifest for unknown in the manifest list entries

我才意识到Windows Server 2019上安装的Docker是Windows容器的:

PS C:\Users\Administrator> docker version
Client: Docker Engine - Enterprise
 Version:           18.09.4
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        c3516c43ef
 Built:             03/27/2019 18:22:15
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Enterprise
 Engine:
  Version:          18.09.4
  API version:      1.39 (minimum version 1.24)
  Go version:       go1.10.8
  Git commit:       c3516c43ef
  Built:            03/27/2019 18:20:29
  OS/Arch:          windows/amd64
  Experimental:     false

我第一个想到要在Windows Server 2019构建基于Linux OS的Docker的方法就是安装WSL(Windows Subsystem for Linux), 然后在WSL中安装Docker。

开始行动,参考这篇文章:https://docs.microsoft.com/en-us/windows/wsl/install-on-server

首先,开启WSL:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

然后按照这篇文章下载自己喜欢的Linux 子系统:https://docs.microsoft.com/en-us/windows/wsl/install-manual

 我选择的是Ubuntu 18/04,下载后解压出来,然后运行:

Rename-Item ./Ubuntu-1804.appx ./Ubuntu.zip
Expand-Archive ./Ubuntu.zip ./Ubuntu

解压出来:

直接执行ubuntu1804.exe安装ubuntu子系统,安装后进入ubuntu执行初始化工作,然后准备在WSL中安装docker:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

恭喜你安装成功

期间遇到很多问题:解决方法当时没有记录下来,可以参考下面几篇文章:

https://zhuanlan.zhihu.com/p/39187620

但是还是有点问题,DNS问题,使用npm install的报错:

npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry-node.aliyun.com/org/1502272316663857/registry/cmgp/@cmgp%2fcommon failed, reason: getaddrinfo EAI_AGAIN registry-node.aliyun.com registry-node.aliyun.com:443

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-04T04_22_31_732Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1

目前还在寻找解决方案中