Windows上的Dart Docker镜像上的Docker [英] Docker on Windows with Dart Docker Image
问题描述
如何确保Dart运行时docker映像的安全性,如何解决此警告? Docker映像最终将托管在Google云中。
How does this warning need to be addressed for a dart runtime docker image to be secure? The docker image will ultimately be hosted in the google cloud.
您正在针对非Windows Docker主机从Windows构建Docker映像。添加到构建上下文的所有文件和目录都将具有 -rwxr-xr-x权限。建议仔细检查并重置敏感文件和目录的权限。
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."
推荐答案
问题20397 解释(信用: Sebastiaan van Stijn-thaJeztah )
之所以添加该警告,是因为Windows文件系统没有将文件标记为可执行的选项。
如果必须将文件标记为可执行文件,则从Windows计算机构建linux映像将破坏该映像。
That warning was added, because the Windows filesystem does not have an option to mark a file as 'executable'.
Building a linux image from a Windows machine would therefore break the image if a file has to be marked executable.
因此,从Windows客户端构建文件时,默认情况下文件被标记为可执行文件;该警告是为了通知您,并(如果需要)将Dockerfile修改为之后更改/删除可执行文件。
For that reason, files are marked executable by default when building from a windows client; the warning is there so that you are notified of that, and (if needed), modify the Dockerfile to change/remove the executable bit afterwards.
我想在 C之后添加Dockerfile OPY
, RUN CHMOD + x aFile_I_Just_Copied
这篇关于Windows上的Dart Docker镜像上的Docker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!