2

Sitecore XP 10.3(latest) Docker一键部署 - 杭伟

 1 year ago
source link: https://www.cnblogs.com/hangwei/p/17352857.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Sitecore XP 10.3(latest) Docker一键部署

本文演示通过PowerShell+Docker Desktop for Windows 一键部署Sitecore10.3(即Sitecore最新版)Docker开发/测试/演示 环境。

官方参考 SitecoreXP 10.3.0 Developer Workstation Deployment With Docker

演示配置为XP Single(XP0) 

1,windows10+/Windows Server2019(Windows Server 1903)+

2,Sitecore 10 license file

3,Docker Desktop for Windows

4,官方建议16GB的内存,实际8GB内存应该也可以(需要验证)

本文示例操作系统为:Windows 11专业版

1,前置条件:Set up the environment

下载并安装Docker Desktop for Windows

416321-20230425162510225-1463601693.png

确保以下端口未被占用:

416321-20230426100505856-1530247776.png

2,下载部署包

 下载 SXP Sitecore Container Deployment 10.3.0.008463.1229,下载SitecoreContainerDeployment.10.3.0.008463.1229.zip文件即可。

416321-20230425164424604-1527714895.png

可以通过compose-init.ps1文件查阅管理后台的密码(默认管理员账号为admin)。

416321-20230425164735822-1027881561.png

以管理员方式打开Windows PowerShell ISE,进入部署包所在目录:

cd D:\Workspace\Sitecore10\SitecoreContainerDeployment.10.3.0.008463.1229\compose\ltsc2022\xp0
.\compose-init.ps1 -LicenseXmlPath D:\license\license.xml

等待命令执行完毕(较耗时,需下载各个image),再执行:

docker-compose up --detach

执行完毕后查看Containers的状态:

416321-20230425192251687-1878287154.png

 打开浏览器,访问:https://xp0cm.localhost/

416321-20230425192312855-1635049430.png

 访问 https://xp0cm.localhost/sitecore 进入管理后台,默认管理员账号为admin

416321-20230425192736300-1592866558.png

 进入Control Panel,重新build index。

1,error:“Pulling from windows/servercore: no matching manifest for linux/amd64 in the manifest list entries”

Docker Desktop托盘, Switch to Windows containers

Docker Desktop默认安装以后还是Linux模式,需要切换到Windows containers模式

2,error: "A parameter cannot be found that matches parameter name 'AllowPrerelease'"

Install-Module -Name PackageManagement -Repository PSGallery -Force -AllowClobber
Install-Module -Name PowerShellGet -Repository PSGallery -Force -AllowClobber

参考 A parameter cannot be found that matches parameter name 'AllowPrerelease'

3,关机后无法启动windows容器

需要先删除全部Container,执行

docker container rm $(docker container ls -aq)

确保当前目录在:

cd D:\Workspace\Sitecore10\SitecoreContainerDeployment.10.3.0.008463.1229\compose\ltsc2022\xp0

然后重新执行:

docker-compose up --detach
416321-20230425173153222-1018968310.png

 启动成功:

416321-20230425173227605-1019455991.png

最后,xp1的docker部署包也同样,切换执行目录即可。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK