windows10环境下安装docker+宝塔开发环境

宝塔是无法在windows10家庭版上直接安装的,我们需要用到docker

首选安装docker

1. 下载安装包:

https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe

2. windows先安装hyper-v及container

2.1 安装hyper-v, 将下面的代码,保存为.cmd格式,用管理员身份运行

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt

for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"

del hyper-v.txt

Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

2.2 安装containers,将下面的代码,保存为.cmd格式,用管理员身份运行

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt

for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"

del containers.txt

Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL

pause

2.3 修改注册表

打开注册表 win + r : regedit ,修改win上的EditionID为: Professional

三步都完成后,重启电脑

2.4 双击安装包,不做任何修改,直接默认安装,安装后电脑会需要再次重启

到此,安装步骤就完成了

可能需要下面的步骤:

下载最新包:

适用于 x64 计算机的 WSL2 Linux 内核更新包



下面,需要再安装centerOS 

运行命令:

docker pull centos:centos7

设置docker的端口映射 

docker run -i -t -d --name baota -p 20:20 -p 21:21 -p 80:80 -p 443:443 -p 888:888 -p 8888:8888 --privileged=true -v /home/www:/www centos

安装完成后,开始安装宝塔:

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh e3bb5f4de

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容