diff --git a/Build/学习.md b/Build/学习.md index f848e87..c9472fc 100644 --- a/Build/学习.md +++ b/Build/学习.md @@ -601,6 +601,24 @@ docker run -p 80:80/tcp -p 80:80/udp ... > > 对于当前镜像的构建没有一点影响;在子镜像构建时默认执行。 ++ SHELL + + > 该指令允许覆盖用于命令的 shell 形式的默认*shell*. linux默认为 + > + > `["/bin/sh", "-c"]` windows默认为`["cmd", "/S", "/C"]` + > + > + > + > ```dockerfile + > FROM microsoft/nanoserver + > SHELL ["powershell","-command"] + > RUN New-Item -ItemType Directory C:\Example + > ADD Execute-MyCmdlet.ps1 c:\example\ + > RUN c:\example\Execute-MyCmdlet -sample 'hello world' + > ``` + > + > + + 小结 暂无