- 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.
推薦閱讀
- Beginning Java Data Structures and Algorithms
- Pandas Cookbook
- PHP 從入門到項目實踐(超值版)
- 深入理解Django:框架內幕與實現原理
- 單片機C語言程序設計實訓100例:基于STC8051+Proteus仿真與實戰
- C語言程序設計立體化案例教程
- Mastering Unity Shaders and Effects
- 微信小程序入門指南
- The Professional ScrumMaster’s Handbook
- Machine Learning in Java
- Regression Analysis with Python
- JavaScript從入門到精通(視頻實戰版)
- Android移動應用項目化教程
- Application Development with Parse using iOS SDK
- 從零開始學UI:概念解析、實戰提高、突破規則