docker - 在 Docker 上构建 mssql-server-windows-express 时出错
问题描述
平台为 Windows Server 2019
Docker 版本:4.0.0.0 (67817)
Docker 引擎:v20.10.8
从以下 URL 下载 Dockerfile:
https://github.com/microsoft/mssql-docker/tree/master/windows/mssql-server-windows-express
我们已将基本映像从“microsoft/windowsservercore”替换为“mcr.microsoft.com/windows/servercore:ltsc2019”
重现步骤:
- 以管理员身份打开 PowerShell
- 执行 docker build 命令
Docker 构建 -t sql-express 。
执行 setup.exe 文件时,它会引发错误,如下图所示。
Step 8/10 : RUN Invoke-WebRequest -Uri $env:sql_express_download_url -OutFile sqlexpress.exe ; Start-Process -Wait -FilePath .\sqlexpress.exe -ArgumentList /qs, /x:setup ; .\setup\setup.exe /q /ACTION=Install /INSTANCENAME=SQLEXPRESS /FEATURES=SQLEngine /UPDATEENABLED=0 /SQLSVCACCOUNT='NT AUTHORITY\System' /SQLSYSADMINACCOUNTS='BUILTIN\ADMINISTRATORS' /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS ; Remove-Item -Recurse -Force sqlexpress.exe, setup
---> Running in ab792bae7347
.\setup\setup.exe : The term '.\setup\setup.exe' is not recognized as the name
of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:232
+ ... qlexpress.exe -ArgumentList /qs, /x:setup ; .\setup\setup.exe /q /ACT ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.\setup\setup.exe:String) [], P
arentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
解决方案
推荐阅读
- android - 使用 GSON 从 json 数组中删除空对象
- mysql - Mysql - 如果 table1.id = table2.id > 1 则显示一行
- c++ - 如何声明要在 C++ Qt 中的函数中使用的变量?
- excel - 如何复制模板,用另一个工作表中的数据填充它,并从另一个工作表中的范围重命名它而不创建模板(2)?
- angular - 如何按字母顺序将节点插入离子列表
- php - 如何使用 php 从标签后出现的文本文件中读取特定行
- java - JPQL:使用复合键建模的具有多对多关系的查询实体
- python - Python中“重命名文件”的单元测试
- eclipse - Eclipse 无法从 Facelets 中的 AbstractBean/AbstractEntity 中看到 Beans 模型的字段之外
- reactjs - ReactJS - '@material-ui/icons/Fastfood' 不工作