小编sxm*_*972的帖子

在 Docker(适用于 Windows)中,如何在构建映像时批量添加注册表项?

我正在使用 Docker for Windows 并使用 Dockerfile 构建 docker 映像,如下所示:

FROM mydockerhublogin/win2k16-ruby:1.0

# Set the working directory to /app
WORKDIR /app

# Copy the current directory contents into the container at /app
ADD . /app


# Make port 80 available to the world outside this container
EXPOSE 80

# Define environment variable
ENV NAME World

RUN powershell -Command \
    $ErrorActionPreference = 'Stop'; \
  New-Item "HKLM:\Software\WOW6432Node\ExampleCom" -Force ; \
  New-ItemProperty "HKLM:\Software\WOW6432Node\ExampleCom" -Name MenuLastUpdate -Value "test" -Force

RUN powershell -Command \
    $ErrorActionPreference = …
Run Code Online (Sandbox Code Playgroud)

windows registry docker

3
推荐指数
1
解决办法
5737
查看次数

标签 统计

docker ×1

registry ×1

windows ×1