Update help line to allow 90 characters instead of 80
The trust flag pushes out the help description column wider, requiring more room to display help messages.
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
| ... | ... |
@@ -37,7 +37,7 @@ var untrusted bool |
| 37 | 37 |
|
| 38 | 38 |
func addTrustedFlags(fs *flag.FlagSet, verify bool) {
|
| 39 | 39 |
var trusted bool |
| 40 |
- if e := os.Getenv("DOCKER_TRUST"); e != "" {
|
|
| 40 |
+ if e := os.Getenv("DOCKER_CONTENT_TRUST"); e != "" {
|
|
| 41 | 41 |
if t, err := strconv.ParseBool(e); t || err != nil {
|
| 42 | 42 |
// treat any other value as true |
| 43 | 43 |
trusted = true |
| ... | ... |
@@ -47,7 +47,7 @@ func addTrustedFlags(fs *flag.FlagSet, verify bool) {
|
| 47 | 47 |
if verify {
|
| 48 | 48 |
message = "Skip image verification" |
| 49 | 49 |
} |
| 50 |
- fs.BoolVar(&untrusted, []string{"-untrusted"}, !trusted, message)
|
|
| 50 |
+ fs.BoolVar(&untrusted, []string{"-disable-content-trust"}, !trusted, message)
|
|
| 51 | 51 |
} |
| 52 | 52 |
|
| 53 | 53 |
func isTrusted() bool {
|
| ... | ... |
@@ -79,7 +79,7 @@ func (cli *DockerCli) certificateDirectory(server string) (string, error) {
|
| 79 | 79 |
} |
| 80 | 80 |
|
| 81 | 81 |
func trustServer(index *registry.IndexInfo) string {
|
| 82 |
- if s := os.Getenv("DOCKER_TRUST_SERVER"); s != "" {
|
|
| 82 |
+ if s := os.Getenv("DOCKER_CONTENT_TRUST_SERVER"); s != "" {
|
|
| 83 | 83 |
if !strings.HasPrefix(s, "https://") {
|
| 84 | 84 |
return "https://" + s |
| 85 | 85 |
} |
| ... | ... |
@@ -178,9 +178,9 @@ func convertTarget(t client.Target) (target, error) {
|
| 178 | 178 |
func (cli *DockerCli) getPassphraseRetriever() passphrase.Retriever {
|
| 179 | 179 |
baseRetriever := passphrase.PromptRetrieverWithInOut(cli.in, cli.out) |
| 180 | 180 |
env := map[string]string{
|
| 181 |
- "root": os.Getenv("DOCKER_TRUST_ROOT_PASSPHRASE"),
|
|
| 182 |
- "targets": os.Getenv("DOCKER_TRUST_TARGET_PASSPHRASE"),
|
|
| 183 |
- "snapshot": os.Getenv("DOCKER_TRUST_SNAPSHOT_PASSPHRASE"),
|
|
| 181 |
+ "root": os.Getenv("DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE"),
|
|
| 182 |
+ "targets": os.Getenv("DOCKER_CONTENT_TRUST_TARGET_PASSPHRASE"),
|
|
| 183 |
+ "snapshot": os.Getenv("DOCKER_CONTENT_TRUST_SNAPSHOT_PASSPHRASE"),
|
|
| 184 | 184 |
} |
| 185 | 185 |
return func(keyName string, alias string, createNew bool, numAttempts int) (string, bool, error) {
|
| 186 | 186 |
if v := env[alias]; v != "" {
|
| ... | ... |
@@ -49,8 +49,8 @@ by the `docker` command line: |
| 49 | 49 |
unsuitable for Docker. |
| 50 | 50 |
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'. |
| 51 | 51 |
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote. |
| 52 |
-* `DOCKER_TRUST` When set Docker uses notary to sign and verify images. |
|
| 53 |
- Equates to `--untrusted=false` for build, create, pull, push, run. |
|
| 52 |
+* `DOCKER_CONTENT_TRUST` When set Docker uses notary to sign and verify images. |
|
| 53 |
+ Equates to `--disable-content-trust=false` for build, create, pull, push, run. |
|
| 54 | 54 |
* `DOCKER_TMPDIR` Location for temporary Docker files. |
| 55 | 55 |
|
| 56 | 56 |
Because Docker is developed using 'Go', you can also use any environment |
| ... | ... |
@@ -17,57 +17,57 @@ Creates a new container. |
| 17 | 17 |
|
| 18 | 18 |
Create a new container |
| 19 | 19 |
|
| 20 |
- -a, --attach=[] Attach to STDIN, STDOUT or STDERR |
|
| 21 |
- --add-host=[] Add a custom host-to-IP mapping (host:ip) |
|
| 22 |
- --blkio-weight=0 Block IO weight (relative weight) |
|
| 23 |
- -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 24 |
- --cap-add=[] Add Linux capabilities |
|
| 25 |
- --cap-drop=[] Drop Linux capabilities |
|
| 26 |
- --cgroup-parent="" Optional parent cgroup for the container |
|
| 27 |
- --cidfile="" Write the container ID to the file |
|
| 28 |
- --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period |
|
| 29 |
- --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota |
|
| 30 |
- --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) |
|
| 31 |
- --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
|
| 32 |
- --device=[] Add a host device to the container |
|
| 33 |
- --dns=[] Set custom DNS servers |
|
| 34 |
- --dns-search=[] Set custom DNS search domains |
|
| 35 |
- -e, --env=[] Set environment variables |
|
| 36 |
- --entrypoint="" Overwrite the default ENTRYPOINT of the image |
|
| 37 |
- --env-file=[] Read in a file of environment variables |
|
| 38 |
- --expose=[] Expose a port or a range of ports |
|
| 39 |
- -h, --hostname="" Container host name |
|
| 40 |
- --help=false Print usage |
|
| 41 |
- -i, --interactive=false Keep STDIN open even if not attached |
|
| 42 |
- --ipc="" IPC namespace to use |
|
| 43 |
- -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
|
| 44 |
- --label-file=[] Read in a line delimited file of labels |
|
| 45 |
- --link=[] Add link to another container |
|
| 46 |
- --log-driver="" Logging driver for container |
|
| 47 |
- --log-opt=[] Log driver specific options |
|
| 48 |
- --lxc-conf=[] Add custom lxc options |
|
| 49 |
- -m, --memory="" Memory limit |
|
| 50 |
- --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
|
| 51 |
- --memory-swap="" Total memory (memory + swap), '-1' to disable swap |
|
| 52 |
- --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 53 |
- --name="" Assign a name to the container |
|
| 54 |
- --net="bridge" Set the Network mode for the container |
|
| 55 |
- --oom-kill-disable=false Whether to disable OOM Killer for the container or not |
|
| 56 |
- -P, --publish-all=false Publish all exposed ports to random ports |
|
| 57 |
- -p, --publish=[] Publish a container's port(s) to the host |
|
| 58 |
- --pid="" PID namespace to use |
|
| 59 |
- --privileged=false Give extended privileges to this container |
|
| 60 |
- --read-only=false Mount the container's root filesystem as read only |
|
| 61 |
- --restart="no" Restart policy (no, on-failure[:max-retry], always) |
|
| 62 |
- --security-opt=[] Security options |
|
| 63 |
- -t, --tty=false Allocate a pseudo-TTY |
|
| 64 |
- --untrusted=true Skip image verification |
|
| 65 |
- -u, --user="" Username or UID |
|
| 66 |
- --ulimit=[] Ulimit options |
|
| 67 |
- --uts="" UTS namespace to use |
|
| 68 |
- -v, --volume=[] Bind mount a volume |
|
| 69 |
- --volumes-from=[] Mount volumes from the specified container(s) |
|
| 70 |
- -w, --workdir="" Working directory inside the container |
|
| 20 |
+ -a, --attach=[] Attach to STDIN, STDOUT or STDERR |
|
| 21 |
+ --add-host=[] Add a custom host-to-IP mapping (host:ip) |
|
| 22 |
+ --blkio-weight=0 Block IO weight (relative weight) |
|
| 23 |
+ -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 24 |
+ --cap-add=[] Add Linux capabilities |
|
| 25 |
+ --cap-drop=[] Drop Linux capabilities |
|
| 26 |
+ --cgroup-parent="" Optional parent cgroup for the container |
|
| 27 |
+ --cidfile="" Write the container ID to the file |
|
| 28 |
+ --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period |
|
| 29 |
+ --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota |
|
| 30 |
+ --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) |
|
| 31 |
+ --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
|
| 32 |
+ --device=[] Add a host device to the container |
|
| 33 |
+ --dns=[] Set custom DNS servers |
|
| 34 |
+ --dns-search=[] Set custom DNS search domains |
|
| 35 |
+ -e, --env=[] Set environment variables |
|
| 36 |
+ --entrypoint="" Overwrite the default ENTRYPOINT of the image |
|
| 37 |
+ --env-file=[] Read in a file of environment variables |
|
| 38 |
+ --expose=[] Expose a port or a range of ports |
|
| 39 |
+ -h, --hostname="" Container host name |
|
| 40 |
+ --help=false Print usage |
|
| 41 |
+ -i, --interactive=false Keep STDIN open even if not attached |
|
| 42 |
+ --ipc="" IPC namespace to use |
|
| 43 |
+ -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
|
| 44 |
+ --label-file=[] Read in a line delimited file of labels |
|
| 45 |
+ --link=[] Add link to another container |
|
| 46 |
+ --log-driver="" Logging driver for container |
|
| 47 |
+ --log-opt=[] Log driver specific options |
|
| 48 |
+ --lxc-conf=[] Add custom lxc options |
|
| 49 |
+ -m, --memory="" Memory limit |
|
| 50 |
+ --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
|
| 51 |
+ --memory-swap="" Total memory (memory + swap), '-1' to disable swap |
|
| 52 |
+ --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 53 |
+ --name="" Assign a name to the container |
|
| 54 |
+ --net="bridge" Set the Network mode for the container |
|
| 55 |
+ --oom-kill-disable=false Whether to disable OOM Killer for the container or not |
|
| 56 |
+ -P, --publish-all=false Publish all exposed ports to random ports |
|
| 57 |
+ -p, --publish=[] Publish a container's port(s) to the host |
|
| 58 |
+ --pid="" PID namespace to use |
|
| 59 |
+ --privileged=false Give extended privileges to this container |
|
| 60 |
+ --read-only=false Mount the container's root filesystem as read only |
|
| 61 |
+ --restart="no" Restart policy (no, on-failure[:max-retry], always) |
|
| 62 |
+ --security-opt=[] Security options |
|
| 63 |
+ -t, --tty=false Allocate a pseudo-TTY |
|
| 64 |
+ --disable-content-trust=true Skip image verification |
|
| 65 |
+ -u, --user="" Username or UID |
|
| 66 |
+ --ulimit=[] Ulimit options |
|
| 67 |
+ --uts="" UTS namespace to use |
|
| 68 |
+ -v, --volume=[] Bind mount a volume |
|
| 69 |
+ --volumes-from=[] Mount volumes from the specified container(s) |
|
| 70 |
+ -w, --workdir="" Working directory inside the container |
|
| 71 | 71 |
|
| 72 | 72 |
The `docker create` command creates a writeable container layer over the |
| 73 | 73 |
specified image and prepares it for running the specified command. The |
| ... | ... |
@@ -15,8 +15,8 @@ weight=1 |
| 15 | 15 |
|
| 16 | 16 |
Pull an image or a repository from the registry |
| 17 | 17 |
|
| 18 |
- -a, --all-tags=false Download all tagged images in the repository |
|
| 19 |
- --untrusted=true Skip image verification |
|
| 18 |
+ -a, --all-tags=false Download all tagged images in the repository |
|
| 19 |
+ --disable-content-trust=true Skip image verification |
|
| 20 | 20 |
|
| 21 | 21 |
Most of your images will be created on top of a base image from the |
| 22 | 22 |
[Docker Hub](https://hub.docker.com) registry. |
| ... | ... |
@@ -15,7 +15,7 @@ weight=1 |
| 15 | 15 |
|
| 16 | 16 |
Push an image or a repository to the registry |
| 17 | 17 |
|
| 18 |
- --untrusted=true Skip image signing |
|
| 18 |
+ --disable-content-trust=true Skip image signing |
|
| 19 | 19 |
|
| 20 | 20 |
Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com) |
| 21 | 21 |
registry or to a self-hosted one. |
| ... | ... |
@@ -15,61 +15,61 @@ weight=1 |
| 15 | 15 |
|
| 16 | 16 |
Run a command in a new container |
| 17 | 17 |
|
| 18 |
- -a, --attach=[] Attach to STDIN, STDOUT or STDERR |
|
| 19 |
- --add-host=[] Add a custom host-to-IP mapping (host:ip) |
|
| 20 |
- --blkio-weight=0 Block IO weight (relative weight) |
|
| 21 |
- -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 22 |
- --cap-add=[] Add Linux capabilities |
|
| 23 |
- --cap-drop=[] Drop Linux capabilities |
|
| 24 |
- --cgroup-parent="" Optional parent cgroup for the container |
|
| 25 |
- --cidfile="" Write the container ID to the file |
|
| 26 |
- --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period |
|
| 27 |
- --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota |
|
| 28 |
- --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) |
|
| 29 |
- --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
|
| 30 |
- -d, --detach=false Run container in background and print container ID |
|
| 31 |
- --device=[] Add a host device to the container |
|
| 32 |
- --dns=[] Set custom DNS servers |
|
| 33 |
- --dns-search=[] Set custom DNS search domains |
|
| 34 |
- -e, --env=[] Set environment variables |
|
| 35 |
- --entrypoint="" Overwrite the default ENTRYPOINT of the image |
|
| 36 |
- --env-file=[] Read in a file of environment variables |
|
| 37 |
- --expose=[] Expose a port or a range of ports |
|
| 38 |
- --group-add=[] Add additional groups to run as |
|
| 39 |
- -h, --hostname="" Container host name |
|
| 40 |
- --help=false Print usage |
|
| 41 |
- -i, --interactive=false Keep STDIN open even if not attached |
|
| 42 |
- --ipc="" IPC namespace to use |
|
| 43 |
- -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
|
| 44 |
- --label-file=[] Read in a file of labels (EOL delimited) |
|
| 45 |
- --link=[] Add link to another container |
|
| 46 |
- --log-driver="" Logging driver for container |
|
| 47 |
- --log-opt=[] Log driver specific options |
|
| 48 |
- --lxc-conf=[] Add custom lxc options |
|
| 49 |
- -m, --memory="" Memory limit |
|
| 50 |
- --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
|
| 51 |
- --memory-swap="" Total memory (memory + swap), '-1' to disable swap |
|
| 52 |
- --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 53 |
- --name="" Assign a name to the container |
|
| 54 |
- --net="bridge" Set the Network mode for the container |
|
| 55 |
- --oom-kill-disable=false Whether to disable OOM Killer for the container or not |
|
| 56 |
- -P, --publish-all=false Publish all exposed ports to random ports |
|
| 57 |
- -p, --publish=[] Publish a container's port(s) to the host |
|
| 58 |
- --pid="" PID namespace to use |
|
| 59 |
- --privileged=false Give extended privileges to this container |
|
| 60 |
- --read-only=false Mount the container's root filesystem as read only |
|
| 61 |
- --restart="no" Restart policy (no, on-failure[:max-retry], always) |
|
| 62 |
- --rm=false Automatically remove the container when it exits |
|
| 63 |
- --security-opt=[] Security Options |
|
| 64 |
- --sig-proxy=true Proxy received signals to the process |
|
| 65 |
- -t, --tty=false Allocate a pseudo-TTY |
|
| 66 |
- -u, --user="" Username or UID (format: <name|uid>[:<group|gid>]) |
|
| 67 |
- --ulimit=[] Ulimit options |
|
| 68 |
- --untrusted=true Skip image verification |
|
| 69 |
- --uts="" UTS namespace to use |
|
| 70 |
- -v, --volume=[] Bind mount a volume |
|
| 71 |
- --volumes-from=[] Mount volumes from the specified container(s) |
|
| 72 |
- -w, --workdir="" Working directory inside the container |
|
| 18 |
+ -a, --attach=[] Attach to STDIN, STDOUT or STDERR |
|
| 19 |
+ --add-host=[] Add a custom host-to-IP mapping (host:ip) |
|
| 20 |
+ --blkio-weight=0 Block IO weight (relative weight) |
|
| 21 |
+ -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 22 |
+ --cap-add=[] Add Linux capabilities |
|
| 23 |
+ --cap-drop=[] Drop Linux capabilities |
|
| 24 |
+ --cgroup-parent="" Optional parent cgroup for the container |
|
| 25 |
+ --cidfile="" Write the container ID to the file |
|
| 26 |
+ --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period |
|
| 27 |
+ --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota |
|
| 28 |
+ --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) |
|
| 29 |
+ --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
|
| 30 |
+ -d, --detach=false Run container in background and print container ID |
|
| 31 |
+ --device=[] Add a host device to the container |
|
| 32 |
+ --dns=[] Set custom DNS servers |
|
| 33 |
+ --dns-search=[] Set custom DNS search domains |
|
| 34 |
+ -e, --env=[] Set environment variables |
|
| 35 |
+ --entrypoint="" Overwrite the default ENTRYPOINT of the image |
|
| 36 |
+ --env-file=[] Read in a file of environment variables |
|
| 37 |
+ --expose=[] Expose a port or a range of ports |
|
| 38 |
+ --group-add=[] Add additional groups to run as |
|
| 39 |
+ -h, --hostname="" Container host name |
|
| 40 |
+ --help=false Print usage |
|
| 41 |
+ -i, --interactive=false Keep STDIN open even if not attached |
|
| 42 |
+ --ipc="" IPC namespace to use |
|
| 43 |
+ -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
|
| 44 |
+ --label-file=[] Read in a file of labels (EOL delimited) |
|
| 45 |
+ --link=[] Add link to another container |
|
| 46 |
+ --log-driver="" Logging driver for container |
|
| 47 |
+ --log-opt=[] Log driver specific options |
|
| 48 |
+ --lxc-conf=[] Add custom lxc options |
|
| 49 |
+ -m, --memory="" Memory limit |
|
| 50 |
+ --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
|
| 51 |
+ --memory-swap="" Total memory (memory + swap), '-1' to disable swap |
|
| 52 |
+ --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 53 |
+ --name="" Assign a name to the container |
|
| 54 |
+ --net="bridge" Set the Network mode for the container |
|
| 55 |
+ --oom-kill-disable=false Whether to disable OOM Killer for the container or not |
|
| 56 |
+ -P, --publish-all=false Publish all exposed ports to random ports |
|
| 57 |
+ -p, --publish=[] Publish a container's port(s) to the host |
|
| 58 |
+ --pid="" PID namespace to use |
|
| 59 |
+ --privileged=false Give extended privileges to this container |
|
| 60 |
+ --read-only=false Mount the container's root filesystem as read only |
|
| 61 |
+ --restart="no" Restart policy (no, on-failure[:max-retry], always) |
|
| 62 |
+ --rm=false Automatically remove the container when it exits |
|
| 63 |
+ --security-opt=[] Security Options |
|
| 64 |
+ --sig-proxy=true Proxy received signals to the process |
|
| 65 |
+ -t, --tty=false Allocate a pseudo-TTY |
|
| 66 |
+ -u, --user="" Username or UID (format: <name|uid>[:<group|gid>]) |
|
| 67 |
+ --ulimit=[] Ulimit options |
|
| 68 |
+ --disable-content-trust=true Skip image verification |
|
| 69 |
+ --uts="" UTS namespace to use |
|
| 70 |
+ -v, --volume=[] Bind mount a volume |
|
| 71 |
+ --volumes-from=[] Mount volumes from the specified container(s) |
|
| 72 |
+ -w, --workdir="" Working directory inside the container |
|
| 73 | 73 |
|
| 74 | 74 |
The `docker run` command first `creates` a writeable container layer over the |
| 75 | 75 |
specified image, and then `starts` it using the specified command. That is, |
| ... | ... |
@@ -294,7 +294,7 @@ func (s *DockerTrustSuite) TestTrustedCreate(c *check.C) {
|
| 294 | 294 |
dockerCmd(c, "rmi", repoName) |
| 295 | 295 |
|
| 296 | 296 |
// Try untrusted create to ensure we pushed the tag to the registry |
| 297 |
- createCmd = exec.Command(dockerBinary, "create", "--untrusted=true", repoName) |
|
| 297 |
+ createCmd = exec.Command(dockerBinary, "create", "--disable-content-trust=true", repoName) |
|
| 298 | 298 |
s.trustedCmd(createCmd) |
| 299 | 299 |
out, _, err = runCommandWithOutput(createCmd) |
| 300 | 300 |
if err != nil {
|
| ... | ... |
@@ -302,7 +302,7 @@ func (s *DockerTrustSuite) TestTrustedCreate(c *check.C) {
|
| 302 | 302 |
} |
| 303 | 303 |
|
| 304 | 304 |
if !strings.Contains(string(out), "Status: Downloaded") {
|
| 305 |
- c.Fatalf("Missing expected output on trusted create with --untrusted:\n%s", out)
|
|
| 305 |
+ c.Fatalf("Missing expected output on trusted create with --disable-content-trust:\n%s", out)
|
|
| 306 | 306 |
} |
| 307 | 307 |
} |
| 308 | 308 |
|
| ... | ... |
@@ -366,7 +366,7 @@ func (s *DockerTrustSuite) TestCreateWhenCertExpired(c *check.C) {
|
| 366 | 366 |
|
| 367 | 367 |
runAtDifferentDate(elevenYearsFromNow, func() {
|
| 368 | 368 |
// Try create |
| 369 |
- createCmd := exec.Command(dockerBinary, "create", "--untrusted", repoName) |
|
| 369 |
+ createCmd := exec.Command(dockerBinary, "create", "--disable-content-trust", repoName) |
|
| 370 | 370 |
s.trustedCmd(createCmd) |
| 371 | 371 |
out, _, err := runCommandWithOutput(createCmd) |
| 372 | 372 |
if err != nil {
|
| ... | ... |
@@ -132,7 +132,7 @@ func (s *DockerSuite) TestHelpTextVerify(c *check.C) {
|
| 132 | 132 |
// Check each line for lots of stuff |
| 133 | 133 |
lines := strings.Split(out, "\n") |
| 134 | 134 |
for _, line := range lines {
|
| 135 |
- if len(line) > 80 {
|
|
| 135 |
+ if len(line) > 90 {
|
|
| 136 | 136 |
c.Fatalf("Help for %q is too long(%d chars):\n%s", cmd,
|
| 137 | 137 |
len(line), line) |
| 138 | 138 |
} |
| ... | ... |
@@ -174,7 +174,7 @@ func (s *DockerTrustSuite) TestTrustedPull(c *check.C) {
|
| 174 | 174 |
dockerCmd(c, "rmi", repoName) |
| 175 | 175 |
|
| 176 | 176 |
// Try untrusted pull to ensure we pushed the tag to the registry |
| 177 |
- pullCmd = exec.Command(dockerBinary, "pull", "--untrusted=true", repoName) |
|
| 177 |
+ pullCmd = exec.Command(dockerBinary, "pull", "--disable-content-trust=true", repoName) |
|
| 178 | 178 |
s.trustedCmd(pullCmd) |
| 179 | 179 |
out, _, err = runCommandWithOutput(pullCmd) |
| 180 | 180 |
if err != nil {
|
| ... | ... |
@@ -182,7 +182,7 @@ func (s *DockerTrustSuite) TestTrustedPull(c *check.C) {
|
| 182 | 182 |
} |
| 183 | 183 |
|
| 184 | 184 |
if !strings.Contains(string(out), "Status: Downloaded") {
|
| 185 |
- c.Fatalf("Missing expected output on trusted pull with --untrusted:\n%s", out)
|
|
| 185 |
+ c.Fatalf("Missing expected output on trusted pull with --disable-content-trust:\n%s", out)
|
|
| 186 | 186 |
} |
| 187 | 187 |
} |
| 188 | 188 |
|
| ... | ... |
@@ -246,7 +246,7 @@ func (s *DockerTrustSuite) TestPullWhenCertExpired(c *check.C) {
|
| 246 | 246 |
|
| 247 | 247 |
runAtDifferentDate(elevenYearsFromNow, func() {
|
| 248 | 248 |
// Try pull |
| 249 |
- pullCmd := exec.Command(dockerBinary, "pull", "--untrusted", repoName) |
|
| 249 |
+ pullCmd := exec.Command(dockerBinary, "pull", "--disable-content-trust", repoName) |
|
| 250 | 250 |
s.trustedCmd(pullCmd) |
| 251 | 251 |
out, _, err := runCommandWithOutput(pullCmd) |
| 252 | 252 |
if err != nil {
|
| ... | ... |
@@ -182,15 +182,15 @@ func (s *DockerTrustSuite) TestTrustedPushWithoutServerAndUntrusted(c *check.C) |
| 182 | 182 |
// tag the image and upload it to the private registry |
| 183 | 183 |
dockerCmd(c, "tag", "busybox", repoName) |
| 184 | 184 |
|
| 185 |
- pushCmd := exec.Command(dockerBinary, "push", "--untrusted", repoName) |
|
| 185 |
+ pushCmd := exec.Command(dockerBinary, "push", "--disable-content-trust", repoName) |
|
| 186 | 186 |
s.trustedCmdWithServer(pushCmd, "example/") |
| 187 | 187 |
out, _, err := runCommandWithOutput(pushCmd) |
| 188 | 188 |
if err != nil {
|
| 189 |
- c.Fatalf("trusted push with no server and --untrusted failed: %s\n%s", err, out)
|
|
| 189 |
+ c.Fatalf("trusted push with no server and --disable-content-trust failed: %s\n%s", err, out)
|
|
| 190 | 190 |
} |
| 191 | 191 |
|
| 192 | 192 |
if strings.Contains(string(out), "Error establishing connection to notary repository") {
|
| 193 |
- c.Fatalf("Missing expected output on trusted push with --untrusted:\n%s", out)
|
|
| 193 |
+ c.Fatalf("Missing expected output on trusted push with --disable-content-trust:\n%s", out)
|
|
| 194 | 194 |
} |
| 195 | 195 |
} |
| 196 | 196 |
|
| ... | ... |
@@ -252,7 +252,7 @@ func (s *DockerTrustSuite) TestTrustedPushWithExistingSignedTag(c *check.C) {
|
| 252 | 252 |
} |
| 253 | 253 |
|
| 254 | 254 |
if !strings.Contains(string(out), "Status: Downloaded") {
|
| 255 |
- c.Fatalf("Missing expected output on trusted pull with --untrusted:\n%s", out)
|
|
| 255 |
+ c.Fatalf("Missing expected output on trusted pull with --disable-content-trust:\n%s", out)
|
|
| 256 | 256 |
} |
| 257 | 257 |
} |
| 258 | 258 |
|
| ... | ... |
@@ -2566,7 +2566,7 @@ func (s *DockerTrustSuite) TestTrustedRun(c *check.C) {
|
| 2566 | 2566 |
dockerCmd(c, "rmi", repoName) |
| 2567 | 2567 |
|
| 2568 | 2568 |
// Try untrusted run to ensure we pushed the tag to the registry |
| 2569 |
- runCmd = exec.Command(dockerBinary, "run", "--untrusted=true", repoName) |
|
| 2569 |
+ runCmd = exec.Command(dockerBinary, "run", "--disable-content-trust=true", repoName) |
|
| 2570 | 2570 |
s.trustedCmd(runCmd) |
| 2571 | 2571 |
out, _, err = runCommandWithOutput(runCmd) |
| 2572 | 2572 |
if err != nil {
|
| ... | ... |
@@ -2574,7 +2574,7 @@ func (s *DockerTrustSuite) TestTrustedRun(c *check.C) {
|
| 2574 | 2574 |
} |
| 2575 | 2575 |
|
| 2576 | 2576 |
if !strings.Contains(string(out), "Status: Downloaded") {
|
| 2577 |
- c.Fatalf("Missing expected output on trusted run with --untrusted:\n%s", out)
|
|
| 2577 |
+ c.Fatalf("Missing expected output on trusted run with --disable-content-trust:\n%s", out)
|
|
| 2578 | 2578 |
} |
| 2579 | 2579 |
} |
| 2580 | 2580 |
|
| ... | ... |
@@ -2620,7 +2620,7 @@ func (s *DockerTrustSuite) TestRunWhenCertExpired(c *check.C) {
|
| 2620 | 2620 |
|
| 2621 | 2621 |
runAtDifferentDate(elevenYearsFromNow, func() {
|
| 2622 | 2622 |
// Try run |
| 2623 |
- runCmd := exec.Command(dockerBinary, "run", "--untrusted", repoName) |
|
| 2623 |
+ runCmd := exec.Command(dockerBinary, "run", "--disable-content-trust", repoName) |
|
| 2624 | 2624 |
s.trustedCmd(runCmd) |
| 2625 | 2625 |
out, _, err := runCommandWithOutput(runCmd) |
| 2626 | 2626 |
if err != nil {
|
| ... | ... |
@@ -130,11 +130,11 @@ func (s *DockerTrustSuite) trustedCmdWithPassphrases(cmd *exec.Cmd, rootPwd, sna |
| 130 | 130 |
|
| 131 | 131 |
func trustCmdEnv(cmd *exec.Cmd, server, rootPwd, snapshotPwd, targetPwd string) {
|
| 132 | 132 |
env := []string{
|
| 133 |
- "DOCKER_TRUST=1", |
|
| 134 |
- fmt.Sprintf("DOCKER_TRUST_SERVER=%s", server),
|
|
| 135 |
- fmt.Sprintf("DOCKER_TRUST_ROOT_PASSPHRASE=%s", rootPwd),
|
|
| 136 |
- fmt.Sprintf("DOCKER_TRUST_SNAPSHOT_PASSPHRASE=%s", snapshotPwd),
|
|
| 137 |
- fmt.Sprintf("DOCKER_TRUST_TARGET_PASSPHRASE=%s", targetPwd),
|
|
| 133 |
+ "DOCKER_CONTENT_TRUST=1", |
|
| 134 |
+ fmt.Sprintf("DOCKER_CONTENT_TRUST_SERVER=%s", server),
|
|
| 135 |
+ fmt.Sprintf("DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE=%s", rootPwd),
|
|
| 136 |
+ fmt.Sprintf("DOCKER_CONTENT_TRUST_SNAPSHOT_PASSPHRASE=%s", snapshotPwd),
|
|
| 137 |
+ fmt.Sprintf("DOCKER_CONTENT_TRUST_TARGET_PASSPHRASE=%s", targetPwd),
|
|
| 138 | 138 |
} |
| 139 | 139 |
cmd.Env = append(os.Environ(), env...) |
| 140 | 140 |
} |