官术网_书友最值得收藏!

Enabling DCT for the client

In order to enforce DCT when using the Docker CLI for push, build, create, pull, and run, you have to set the DOCKER_CONTENT_TRUST environment variable to 1. By default, DCT is disabled for Docker client. Follow these steps:

  1. Set the DOCKER_CONTENT_TRUST environment variable in the current PowerShell session:
$env:DOCKER_CONTENT_TRUST=1
  1. Run a new container using the signed image that we just created:
docker run -d --rm docker.io/packtpubkubernetesonwindows/iis-demo:1.0.1
  1. You will notice that the container starts without any problem. Now, try creating a new container using the latest tag, which was not signed:
PS C:\src> docker run -d --rm docker.io/packtpubkubernetesonwindows/iis-demo:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: No valid trust data for latest.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

This short scenario shows how DCT can be used to ensure the integrity and source of the image that's used for container creation.

主站蜘蛛池模板: 鄱阳县| 济阳县| 徐汇区| 舒城县| 张北县| 湟源县| 敦煌市| 方山县| 庐江县| 怀安县| 宜兴市| 葵青区| 建瓯市| 呼玛县| 怀来县| 安岳县| 安图县| 昭通市| 龙山县| 城市| 永兴县| 正定县| 芜湖市| 连云港市| 徐水县| 河池市| 安溪县| 香格里拉县| 连江县| 尖扎县| 东至县| 左权县| 德保县| 孟津县| 利辛县| 青河县| 县级市| 溧水县| 金堂县| 南岸区| 天全县|