2017-09-06 188 views
3

我试图建立从一个码头工人的客户端运行此命令泊坞窗图像(Windows)中:的Windows搬运工生成警告非Windows搬运工主机

docker --host a.b.c.d build --no-cache=true --build-arg CONFIGURATION=live -t imagename . 

泊坞窗主机也是一个Windows码头工人,但我得到这个错误:

SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

然后这一次的第一次尝试后:

invalid character '<' looking for beginning of value

人知道为什么^ h澳鹏?我之前没有错误,唯一的区别在代码源中。有关我使用Jenkins构建项目的信息?谢谢。

UPDATE 1 - Dockerfile

FROM microsoft/windowsservercore 
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] 

ARG CONFIGURATION 
EXPOSE 80 
ADD src/MyFolder/bin/$CONFIGURATION/ /ContainerFolder 
CMD /ContainerFolder/MyApp.exe 
+0

发布您的dockerfile。所以你使用Docker for Windows和WIndows容器模式来激活? –

+0

是的所有的Windows。我已经按照这个链接https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/来设置Docker。 Linux无法使用此安装。 Dockerfile添加到帖子中。 – Guillaume

+0

从外观看,您的docker是否处于Linux容器模式。你可以通过运行'docker run alpine ls -alh/usr/bin'来测试它,如果这个脚本在你的脚本中可用,那么你的windows节点可能不在Windows容器模式 –

回答

0

现在这是固定的。问题出在网关防火墙上,它检测到在构建上下文中发送的文件是木马。 Docker可能会构建上下文zip文件或使用不同的扩展名。