我在 VS 2017 中创建了一个 C# WCF Windows 服务应用程序并添加了 Docker 支持。
创建了以下 Dockerfile:
FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["C:\\WcfService.exe"]
Run Code Online (Sandbox Code Playgroud)
当我在 VS 中使用 docker-compose 构建它时,出现错误:
无法从命令行或调试器启动服务。必须首先安装 Windows 服务(使用 installutil.exe),然后使用 ServerExplorer、Windows 服务管理工具或 NET START 命令启动。程序“[2172] WcfService.exe”已退出,代码为 0 (0x0)。
我已打开 PowerShell 并输入docker ps
- 容器正在运行。所以我使用New-Service
命令并创建“TestService”。当我用来Get-Service
查看所有服务时,我可以在“已停止”模式下在列表中看到它。当我使用时Start-Service TestService
,我收到以下错误:
启动服务:无法启动服务“TestService(TestService)”。在第 1 行:1 个字符:1 + Start-Service TestService + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.ServiceProcess.ServiceController: ServiceController)[启动服务],ServiceCommandException + ExcellentQualifiedErrorId:StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
试图查找信息但没有任何效果。有任何想法吗?
我对Kubernetes世界有点新意.在我的项目中,我们计划在短期内使用Windows容器(.net完整框架)和Linux容器(.net核心).
我们有一个由基础架构团队提供的K8集群,集群中包含Linux和Windows节点.我只是想知道我的Windows容器将如何仅部署到K8集群中的Windows节点.它是由K8处理还是我需要其他什么?
我有一个在 Azure 中运行的 Windows 容器,我试图将持久存储附加到该容器,但是,我找不到任何有关如何执行此操作的文档。
Dockerfile:
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-20190910-windowsservercore-ltsc2016
SHELL ["powershell"]
EXPOSE 443
WORKDIR /CompanyAPP
COPY WebPackage.zip .
RUN Expand-Archive WebPackage.zip . ; `
Rename-Item ./CustomerWebConfigurator ./WebConfigurator; `
Rename-Item ./Customer ./WebRoot; `
Rename-Item ./CustomerWebService ./WebService; `
Rename-Item ./CustomerWCFService ./WCFService; `
rm WebPackage.zip
ARG BUILD
RUN Add-WindowsFeature Net-WCF-HTTP-Activation45;`
Install-PackageProvider -Name Nuget -Force;`
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted;`
Install-Module -Name AWSPowerShell;`
New-WebApplication -Site 'Default Web Site' -Name 'App' -PhysicalPath c:\CompanyAPP\WebRoot; `
New-WebApplication -Site 'Default Web Site' -Name 'AppWebService' -PhysicalPath c:\CompanyAPP\WebService; `
New-WebApplication -Site …
Run Code Online (Sandbox Code Playgroud) 在 Linux 下,可以读取memory.usage_in_bytes
Control Group v1或memory.current
Control Group v2的控制文件。如何获取Windows容器的内存使用情况?
根据Windows 资源管理Kubernetes 文档,Windows 进程隔离的概念是关于作业对象的。我发现可以获取JOBOBJECT_EXTENDED_LIMIT_INFORMATION信息提供PeakJobMemoryUsed
. 但是,查询此信息似乎需要提升权限(因为我得到了Could not get job information: [0x0005] Access is denied.
)。
还有其他方法可以获取有关 Windows 容器内存使用情况的信息吗?
是否可以扩展ACI运行容器?
问题:
我们有一些过时的Cloud Services(.NET Framework v4.7.1)正在迁移到Docker容器,现在我们已经成功地使它们运行并在Azure容器实例中进行响应,但需要能够对其进行扩展的能力负载和弹性。
这是一个较大项目的一部分,我们还在k8s中运行更新的解决方案-所有.NET Core 2微服务。
我们最终的目标是当我们能够在同一主服务器上运行Windows和Linux节点时,将它们引入主要的k8s解决方案中,从而使我们能够在同一集群中运行两个项目。
containers azure azure-container-service windows-container azure-container-instances
我正在启动一个包含自托管集成运行时的 Windows 容器映像(在此处提供我的 MS ),以便能够在本地情况下使用 ADF。它运行得很顺利,直到我需要使用 Parquet 文件。
当我将输出指向 .parquet 时,出现数据工厂任务失败,指出集成运行时容器中缺少 Java。
ErrorCode=JreNotFound,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Java Runtime Environment cannot be found on the Self-hosted Integration Runtime machine. It is required for parsing or writing to Parquet/ORC files. Make sure Java Runtime Environment has been installed on the Self-hosted Integration Runtime machine.,Source=Microsoft.DataTransfer.Common,''Type=System.DllNotFoundException,Message=Unable to load DLL 'jvm.dll': The specified module could not be found.
我采取了修改build.ps1文件的方式来在容器镜像创建过程中安装和配置依赖项。以下是采取的步骤:
安装 Microsoft Visual C++ 2010 Service Pack 1(此处)
安装 Microsoft OpenJDK 17.0.6 LTS - 64 …
我正在尝试在 Windows 10 机器上的 Docker 容器中运行 Jenkins。我使用的是 Windows 容器,而不是 Linux 容器。
我尝试使用本指南: https: //jenkins.io/doc/book/installing/#on-windows 但是,输入的命令适用于 Linux 容器,而不是 Windows 容器。
由于 1709 更新后的已知问题( https://github.com/docker/for-win/issues/1221 ) ,我似乎无法让 Linux 容器工作。
我尝试了“docker pull jenkins”,但是没有 amd64 版本可供拉取。
这里有什么想法吗?我唯一的另一个想法是尝试弄清楚如何从 Windows 容器运行 Java,以便我可以使用 Jenkins .war 文件?
我正在尝试将 portainer 部署到我的本地 docker。我在 Windows 10 上运行 Docker CE 18.0.6.0 版本。我尝试按照这两个页面中的步骤操作:
但我一直试图运行以下命令:
docker run -d -p 9000:9000 --name portainer --restart always -v portainer_data:/data portainer/portainer -H tcp://10.0.75.1:2375
Run Code Online (Sandbox Code Playgroud)
Docker 总是以相同的消息响应:
来自守护进程的错误响应:无效的卷规范:'portainer_data:/data'
我使用以下命令创建了卷:
docker volume create portainer_data
Run Code Online (Sandbox Code Playgroud)
知道可能是什么吗?
docker ×4
windows ×3
azure ×2
containers ×2
kubernetes ×2
java ×1
jenkins ×1
portainer ×1
powershell ×1
winapi ×1