- Hands-On Kubernetes on Windows
- Piotr Tylenda
- 144字
- 2021-06-24 16:54:06
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:
- Set the DOCKER_CONTENT_TRUST environment variable in the current PowerShell session:
$env:DOCKER_CONTENT_TRUST=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
- 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.
推薦閱讀
- Python編程自學手冊
- 自己動手寫搜索引擎
- Scala Design Patterns
- FreeSWITCH 1.6 Cookbook
- Julia機器學習核心編程:人人可用的高性能科學計算
- 小程序,巧運營:微信小程序運營招式大全
- Nexus規模化Scrum框架
- 軟件工程
- Hands-On Natural Language Processing with Python
- 微信小程序項目開發實戰
- Learning FuelPHP for Effective PHP Development
- Mastering Android Development with Kotlin
- 編程可以很簡單
- Java程序設計與項目案例教程
- Instant jQuery Boilerplate for Plugins