2017-09-06 50 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文件或使用不同的擴展名。