windows server2019 不成功的部署docker经历

由于现场网络限制,需要将docker 容器部署到windows-server 2019上

1.在windows server 2019上安装 docker-desktop,貌似内核版本太低,无法安装,g

然后曲线救国,window server 2019安装docker,折腾了半天,貌似docker 环境还是不行,貌似采用 LCOW 这个特性,但是这个特性 貌似几年没维护了,如果有谁成功了,那一定是我太菜了

在 Windows Server 上,Docker 的使用与 Docker Desktop 在 Windows 10 或 11 上的使用有一些不同。Windows Server 主要支持的是基于 Windows 的容器,但如果你希望在 Windows Server 上运行 Linux 容器,可以考虑使用 Linux Containers on Windows (LCOW) 功能。然而需要注意的是,LCOW 已被标记为实验性功能,并且在新版本的 Docker 中可能不再得到官方的支持或推荐。

最后搜到一个帖子讨论

貌似就是不推荐windows-server 跑docker的 linux 内核模式

Windows Server doesn't support Linux containers. Linux containers are available on Windows client (10 and 11) only for development purposes. On a Server machine you can install a Linux VM on Hyper-V and run Docker from there.

Furthermore, Windows Server doesn't have a GUI like Docker Desktop on client. More information here: Prep Windows operating system containers | Microsoft Docs

最后我就是听人劝,吃饱饭,老实的在windows-server里 安装虚拟机,跑linux版本的docker镜像

参考链接

2.Docker get-started: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64)

原来装的普通windows 10上的docker 镜像导出到 windows server上,这里需要说明 原来win10 上底层用的hyper-v,跑的应该是linux版本镜像,所以要么采用上面我没成功的LCOW特性,要么就虚拟机 里干linux容器

docker镜像导入导出命令

3.把原来的 mysql数据搬到 linux容器里,结果遇到Docker-compose : mysqld: Can't create/write to file 'xxxx'' (Errcode: 13 - Permission denied)

采用下面的方案
stackoverflow链接

我把我的mysql 的 data目录 用chown 命令改成 999了,貌似就容器启动成功了

相关推荐
wdfk_prog17 小时前
[Linux]学习笔记系列 -- lib/sort.c 通用的排序库(Generic Sorting Library) 为内核提供标准的、高效的排序功能
linux·运维·c语言·笔记·stm32·学习·bug
jump_jump17 小时前
前端部署工具 PinMe
运维·前端·开源
それども18 小时前
本地怎么远程调试服务器
运维·服务器
Lin_Aries_042119 小时前
容器化 Flask 应用程序
linux·后端·python·docker·容器·flask
斯普信专业组20 小时前
Filebeat写ElasticSearch故障排查思路(上)
运维·elasticsearch·中间件·filebeat
Lin_Aries_042121 小时前
通过配置 GitLab 自动触发项目自动化构建与部署
运维·docker·容器·自动化·云计算·gitlab
zybsjn21 小时前
【实战】理解服务器流量监控中的“上行”和“下行”
运维·服务器
尘埃不入你眼眸21 小时前
Docker操作命令
运维·docker·容器
龙茶清欢21 小时前
2、Nginx 与 Spring Cloud Gateway 详细对比:定位、场景与分工
java·运维·spring boot·nginx·spring cloud·gateway
云动雨颤21 小时前
Linux运维必备:3个内存问题排查命令
linux·运维