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

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.

主站蜘蛛池模板: 中宁县| 邻水| 梓潼县| 讷河市| 耒阳市| 昆明市| 云南省| 蕲春县| 临汾市| 龙泉市| 肥东县| 威海市| 中西区| 莲花县| 永昌县| 荥阳市| 赫章县| 琼中| 昌都县| 乃东县| 济宁市| 安龙县| 泗阳县| 油尖旺区| 思南县| 永新县| 焉耆| 多伦县| 金湖县| 保定市| 牙克石市| 巴林右旗| 和静县| 大丰市| 普陀区| 米易县| 固阳县| 武穴市| 宝鸡市| 伊宁县| 平定县|