Tag: powershell

在Windows上的Docker – 生成不工作

我在Windows 10企业版。 拥有16 GB RAM和英特尔酷睿i7处理器。 我已经安装了最新版本的windows版本(17.06)。 当我尝试执行下面的命令时,它只是失败。 docker build -t myiis:v1 . 当前的工作目录有一个dockerfile,内容如下: FROM microsoft/iis SHELL ["powershell"] COPY MyWebsite MyWebsite EXPOSE 8081 RUN powershell New-Website -Name 'my-app' -Port 8081 -PhysicalPath 'c:\MyWebsite' -ApplicationPool 'MyWebsite' 上述构build的错误代码片段: PS C:\VisualStudio> docker build -t myiis:v1 . Sending build context to Docker daemon 25.73MB Step 1/6 : FROM microsoft/iis —> 52a0c31aaa72 […]

尝试使用Install-Module在Windows Server 2016中安装Docker时出错

我试图在Windows Server 2016中安装Docker没有成功: PS C:\Windows\system32> Install-Module -Name "DockerMsftProvider" -Force -Verbose VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'. VERBOSE: Searching […]

用于Windows上的Matlab Compiler Runtime的Docker构build(非交互式安装)

我注意到在Docker构build中的一些步骤比在容器中手动执行相同的命令需要更多的时间。 为了提供一些上下文,安装Matlab Compiler Runtime(MCR)的过程如下: 从MathWorks网站下载MCR安装程序 解压安装文件 运行/bin/win64/setup.exe -mode silent -agreeToLicense yes( 非交互式安装 ) 我创build了下面的Dockerfile来在包括dotnet-framework的Microsoft windowsservercore映像上设置MCR。 # Line 1: Use dotnet-framework base image FROM microsoft/dotnet-framework # Line 2: Download MCR installer (self-extracting executable) and save as ZIP file ADD https://www.mathworks.com/supportfiles/downloads/R2014b/deployment_files/R2014b/installers/win64/MCR_R2014b_win64_installer.exe C:\\MCR_R2014b_win64_installer.zip # Line 3: Use PowerShell SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # […]

当试图在win10上启动Docker中的hdp sandbox时出现问题

PS C:\users\suyu\Downloads> .\start_sandbox-hdp.ps1 Checking docker daemon… Docker is up and running Found HDP Sandbox image HDP Sandbox container already exists Starting HDP Sandbox… Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "exec: \"C:/Program Files/Git/usr/sbin/sshd\": stat C:/Program File s/Git/usr/sbin/sshd: no such file or directory" Error: failed to start containers: sandbox-hdp Starting processes […]

自动部署Docker图像,这是在PHP技术

我正在为Docker应用程序开发自动化的Azure构build。 我需要连接到容器registry,并从容器中提取图像,并将其推送到在Azure中部署的Docker Swarm资源。 你可以请build议我的步骤。 我需要使用PowerShell脚本自动化

用Selenium安装Docker(Python 3 – Anaconda)

我正在使用Windows,并希望安装Selenium Decker,因为它可以更改每个浏览器实例的时区。 我的问题是如何安装在与pythonPython的窗户上? 我找不到在Windows中安装这个文件。 https://github.com/SeleniumHQ/docker-selenium 这样我可以运行如下命令: $ docker run -d selenium/hub -e "TZ=US/Pacific"… $ docker run -it selenium/node-chrome-debug -e "TZ=US/Eastern"… 这些命令在Powershell中无法识别 我已经下载了这个文件,只能findLinux的信息。 这是不是能够与Python集成?

testingDscConfiguration对容器

我没有问题部署我的Windows 2016容器(基于servercore)和应用configuration推模式(现在,稍后拉),但不知道如何远程testing我的容器的状态(如使用test-dscconfiguration -Computer ….),有什么想法? Ps:我可以用“ Enter-Pssession ”参数使用Enter-Pssession ,并尝试find类似于Test-DscConfiguration的解决scheme或其他任何替代scheme;) 谢谢!

如何编写脚本从Windows共享(\\ … \ …)复制到docker中的某个位置

如何编写脚本从Windows共享(\ …….)复制到泊坞窗中的某个位置。 我已经尝试了以下在Windows共享中find最新的子文件夹。 FOR /F "delims=" %%i IN ('dir "\\….\.." /b /ad-h /t:c /o-d') DO ( SET a=%%i GOTO :found ) echo No subfolder found goto :eof :found echo Most recent sub folder: %a% 有人可以帮我解释剧本吗,因为我还在学习? TIA

Windows下的请求下载Dockerfile失败,'未被识别'

我正在尝试构build自己的Windows Docker镜像。 在dockerfile中,我想下载当前的activemq zip文件。 我使用了几个命令来完成这个任务,但是总是出现错误信息: 我试过的: RUN powershell (New-Object System.Net.WebClient).DownloadFile('http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.zip&action=download', 'c:\temp\activemq.zip') RUN powershell wget 'http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.zip&action=download' -OutFile 'c:\temp\activemq.zip' RUN powershell Invoke-WebRequest -Uri 'http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.zip&action=download' -OutFile c:\temp\activemq.zip RUN ['powershell', 'wget', 'http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.zip&action=download', '-OutFile', 'c:\temp\activemq.zip'] RUN powershell -command 'wget http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.zip&action=download -OutFile c:\temp\activemq.zip' 结果是 “行动”不被识别为内部或外部命令,可操作程序或batch file。 RUN ["powershell", "Invoke-WebRequest -Uri http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.0/apache-activemq-5.15.0-bin.zip&action=download -OutFile c:\temp\activemq.zip"] 结果是 '[“powershell”'不被识别为内部或外部命令,可操作的程序或batch file。 我想,我必须逃避&符号。 我尝试了口音`但是这也不起作用。 我怎样才能下载这个文件? 编辑:命令和下载工作在一个容器内手动。

Windows – Docker CMD不执行

对于我的生活,我似乎无法让我的供应脚本执行时,我运行我的容器。 在路上,我需要将parameter passing给docker run命令来replace多个容器部署中的“hiiii”和“123”。 这是我的docker文件 FROM microsoft/aspnet:3.5-windowsservercore-10.0.14393.1198 SHELL [“powershell”, “-Command”, “$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';”] COPY *.ps1 /Container/ COPY [“wwwroot”, “/inetpub/wwwroot”] COPY [“Admin”, “/Program Files (x86)Admin”] COPY [“Admin/web.config”, “/Program Files (x86)/Admin/web_default.config”] #ENTRYPOINT [“powershell”] CMD [“powershell.exe”, -NoProfile, -File, C:\Container\Start-Admin.Docker.Cmd.ps1 -Parm1 'Hiiii' -parm2 '123'] 我也尝试了CMD的shell版本,如下所示 CMD powershell -NoProfile -File C:\Container\Start-Admin.Docker.Cmd.ps1 -Parm1 'Hiiii' -Parm2 '123' 这是我正在使用的命令。 docker […]