From 64ffe96450123a828ea3ee9783897e37c6dc97df Mon Sep 17 00:00:00 2001 From: Giuseppe De Gaetano Date: Sun, 6 Mar 2022 19:55:48 +0100 Subject: [PATCH 01/12] removed reference to code line number --- language/java/develop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/java/develop.md b/language/java/develop.md index e450306d6c..2c7523b57b 100644 --- a/language/java/develop.md +++ b/language/java/develop.md @@ -163,7 +163,7 @@ We’ll use the debugger that comes with the IntelliJ IDEA. You can use the comm Let's set a breakpoint -Open the following file `src/main/java/org/springframework/samples/petclinic/vet/VetController.java` and add a breakpoint inside the `showResourcesVetList` function, line 54 for example. +Open the following file `src/main/java/org/springframework/samples/petclinic/vet/VetController.java` and add a breakpoint inside the `showResourcesVetList` function. Start your debug session, **Run** menu and then **Debug _NameOfYourConfiguration_** @@ -179,7 +179,7 @@ We can now call the server endpoint. $ curl --request GET --url http://localhost:8080/vets ``` -You should have seen the code break on line 54 and now you are able to use the debugger just like you would normally. You can also inspect and watch variables, set conditional breakpoints, view stack traces and a do bunch of other stuff. +You should have seen the code break on the marked line and now you are able to use the debugger just like you would normally. You can also inspect and watch variables, set conditional breakpoints, view stack traces and a do bunch of other stuff. ![Debugger code breakpoint](images/debugger-breakpoint.png) From 03cd16c2df9e472427b7836666a7bfd0761521fc Mon Sep 17 00:00:00 2001 From: Giuseppe De Gaetano Date: Sun, 6 Mar 2022 23:51:45 +0100 Subject: [PATCH 02/12] removed reference to code line --- language/java/run-tests.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/language/java/run-tests.md b/language/java/run-tests.md index 6d9bab7907..6cfde2083f 100644 --- a/language/java/run-tests.md +++ b/language/java/run-tests.md @@ -16,7 +16,7 @@ Testing is an essential part of modern software development. Testing can mean a ## Refactor Dockerfile to run tests -The **Spring Pet Clinic** source code has already tests defined in the test directory `src/test/java/org/springframework/samples/petclinic`. You just need to update the JaCoCo version in your `pom.xml` to ensure your tests work with JDK v15 or higher with `0.8.6`, so we can use the following Docker command to start the container and run tests: +The **Spring Pet Clinic** source code has already tests defined in the test directory `src/test/java/org/springframework/samples/petclinic`. We can use the following Docker command to start the container and run tests: ```console $ docker run -it --rm --name springboot-test java-docker ./mvnw test @@ -149,13 +149,16 @@ $ docker build -t java-docker --target test . The build output is truncated for simplicity, but you can see that our tests ran succesfully and passed. Let’s break one of the tests and observe the output when our tests fail. -Open the `src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java` file and change **line 57** to the following. +Open the `src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java` file and change the assertion ```shell -55 ConstraintViolation violation = constraintViolations.iterator().next(); -56 assertThat(violation.getPropertyPath().toString()).isEqualTo("firstName"); -57 assertThat(violation.getMessage()).isEqualTo("must be empty"); -58 } + assertThat(violation.getMessage()).isEqualTo("must not be empty"); +``` + +with the following. + +```shell + assertThat(violation.getMessage()).isEqualTo("must be empty"); ``` Now, run the `docker build` command from above and observe that the build fails and the failing testing information is printed to the console. From 1fdb7ed80ae723c7d58ce3420daebe986597101a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Br=C3=B8ms=C3=B8?= Date: Tue, 8 Mar 2022 22:03:42 +0100 Subject: [PATCH 03/12] The Alpine 3.5 image is not longer available The Alpine 3.5 image is not longer available, perhaps `latest` should be used. REF: https://hub.docker.com/_/alpine --- get-started/orchestration.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/get-started/orchestration.md b/get-started/orchestration.md index 9f5089c928..61c67a0a68 100644 --- a/get-started/orchestration.md +++ b/get-started/orchestration.md @@ -43,7 +43,7 @@ Docker Desktop will set up Kubernetes for you quickly and easily. Follow the set spec: containers: - name: testpod - image: alpine:3.5 + image: alpine:latest command: ["ping", "8.8.8.8"] ``` @@ -113,7 +113,7 @@ Docker Desktop will set up Kubernetes for you quickly and easily. Follow the set spec: containers: - name: testpod - image: alpine:3.5 + image: alpine:latest command: ["ping", "8.8.8.8"] ``` @@ -201,7 +201,7 @@ Docker Desktop runs primarily on Docker Engine, which has everything you need to 2. Run a simple Docker service that uses an alpine-based filesystem, and isolates a ping to 8.8.8.8: ```console - $ docker service create --name demo alpine:3.5 ping 8.8.8.8 + $ docker service create --name demo alpine:latest ping 8.8.8.8 ``` 3. Check that your service created one running container: @@ -214,7 +214,7 @@ Docker Desktop runs primarily on Docker Engine, which has everything you need to ```shell ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS - 463j2s3y4b5o demo.1 alpine:3.5 docker-desktop Running Running 8 seconds ago + 463j2s3y4b5o demo.1 alpine:latest docker-desktop Running Running 8 seconds ago ``` 4. Check that you get the logs you'd expect for a ping process: @@ -269,7 +269,7 @@ Docker Desktop runs primarily on Docker Engine, which has everything you need to 2. Run a simple Docker service that uses an alpine-based filesystem, and isolates a ping to 8.8.8.8: ```console - $ docker service create --name demo alpine:3.5 ping 8.8.8.8 + $ docker service create --name demo alpine:latest ping 8.8.8.8 ``` 3. Check that your service created one running container: @@ -282,7 +282,7 @@ Docker Desktop runs primarily on Docker Engine, which has everything you need to ```shell ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS - 463j2s3y4b5o demo.1 alpine:3.5 docker-desktop Running Running 8 seconds ago + 463j2s3y4b5o demo.1 alpine:latest docker-desktop Running Running 8 seconds ago ``` 4. Check that you get the logs you'd expect for a ping process: From 8c106f52604637bf74014a0c64e266649d14574f Mon Sep 17 00:00:00 2001 From: Zeki CELIK Date: Sat, 12 Mar 2022 22:22:07 +0300 Subject: [PATCH 04/12] update osx-setup-guide.md for #14380 update path of the config.yml and com.docker.registry.plist --- registry/recipes/osx-setup-guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/recipes/osx-setup-guide.md b/registry/recipes/osx-setup-guide.md index 16afaac24d..4de1c5570b 100644 --- a/registry/recipes/osx-setup-guide.md +++ b/registry/recipes/osx-setup-guide.md @@ -52,14 +52,14 @@ If you want to understand, you should read [How to Write Go Code](https://golang Copy the registry configuration file in place: mkdir /Users/Shared/Registry - cp docs/osx/config.yml /Users/Shared/Registry/config.yml + cp docs/recipes/osx/config.yml /Users/Shared/Registry/config.yml ## Run the Docker Registry under launchd Copy the Docker registry plist into place: - plutil -lint registry/recipes/osx/com.docker.registry.plist - cp registry/recipes/osx/com.docker.registry.plist ~/Library/LaunchAgents/ + plutil -lint docs/recipes/osx/com.docker.registry.plist + cp docs/recipes/osx/com.docker.registry.plist ~/Library/LaunchAgents/ chmod 644 ~/Library/LaunchAgents/com.docker.registry.plist Start the Docker registry: From 43daee99e192a170f41bff38ecff5c83e520989d Mon Sep 17 00:00:00 2001 From: Marco Marra Date: Tue, 29 Mar 2022 09:41:08 +0200 Subject: [PATCH 05/12] Update envvars.md Replace underscores with hyphens in container names. --- compose/reference/envvars.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/reference/envvars.md b/compose/reference/envvars.md index ef9a16ef98..049a5a6a78 100644 --- a/compose/reference/envvars.md +++ b/compose/reference/envvars.md @@ -17,7 +17,7 @@ Docker command-line client. If you're using `docker-machine`, then the `eval "$( Sets the project name. This value is prepended along with the service name to the container on start up. For example, if your project name is `myapp` and it includes two services `db` and `web`, then Compose starts containers named -`myapp_db_1` and `myapp_web_1` respectively. +`myapp-db-1` and `myapp-web-1` respectively. Setting this is optional. If you do not set this, the `COMPOSE_PROJECT_NAME` defaults to the `basename` of the project directory. See also the `-p` From eb2b74c45bab963976247e90f5b52debc92f9a41 Mon Sep 17 00:00:00 2001 From: Mathieu Champlon Date: Tue, 15 Mar 2022 08:59:15 +0100 Subject: [PATCH 06/12] Add note about CVE-2022-0847 fix being shipped by microsoft --- desktop/windows/release-notes/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop/windows/release-notes/index.md b/desktop/windows/release-notes/index.md index 0a34afa3f6..5a954d7ed2 100644 --- a/desktop/windows/release-notes/index.md +++ b/desktop/windows/release-notes/index.md @@ -52,6 +52,7 @@ Take a look at the [Docker Public Roadmap](https://github.com/docker/roadmap/pro ### Security - Fixed [CVE-2022-0847](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0847){: target="_blank" rel="noopener" class="_"}, aka “Dirty Pipe”, an issue that could enable attackers to modify files in container images on the host, from inside a container. + If using the WSL 2 backend, you must update WSL 2 by running `wsl --update`. - Fixed [CVE-2022-26659](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-26659){: target="_blank" rel="noopener" class="_"}, which could allow an attacker to overwrite any administrator writable file on the system during the installation or the update of Docker Desktop. ### New From 0de0cf0f1debf6294411fd9632128d878ac6a9d5 Mon Sep 17 00:00:00 2001 From: Mandraenke Date: Wed, 6 Apr 2022 08:40:20 +0200 Subject: [PATCH 07/12] added misssing "driver" The example for setting the MTU on the swarm ingress network uses the wrong property: `--opt com.docker.network.mtu=1200` instead of `--opt com.docker.network.driver.mtu=1200` --- engine/swarm/networking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/swarm/networking.md b/engine/swarm/networking.md index 308befcddd..d5a9783cf3 100644 --- a/engine/swarm/networking.md +++ b/engine/swarm/networking.md @@ -330,7 +330,7 @@ services which publish ports, such as a WordPress service which publishes port --ingress \ --subnet=10.11.0.0/16 \ --gateway=10.11.0.2 \ - --opt com.docker.network.mtu=1200 \ + --opt com.docker.network.driver.mtu=1200 \ my-ingress ``` From 0d79d56878be48c039e67b10ac46cf689bccde6e Mon Sep 17 00:00:00 2001 From: halprin Date: Thu, 7 Apr 2022 15:57:39 -0600 Subject: [PATCH 08/12] Terminate the console fix-width example for --output --- engine/sbom/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/sbom/index.md b/engine/sbom/index.md index adce1bdc18..c638f135c1 100644 --- a/engine/sbom/index.md +++ b/engine/sbom/index.md @@ -90,6 +90,7 @@ $ cat sbom.json "spdxVersion": "SPDX-2.2", ... } +``` ## Feedback From ab4991f9b202134d81ef9427f451d7ac3e666a1a Mon Sep 17 00:00:00 2001 From: Jake Levirne <51732+jakelevirne@users.noreply.github.com> Date: Fri, 8 Apr 2022 06:36:46 -0400 Subject: [PATCH 09/12] Update dev-environments.md to match dialog (#14368) * Update dev-environments.md to match dialog Updated to match the "Create a Dev Environment" dialog in Docker Desktop 4.5.0 (74594) * Apply suggestions from code review Update instructions to match the latest UI udpates Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- desktop/dev-environments.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/dev-environments.md b/desktop/dev-environments.md index b50cd2108b..c573c811e9 100644 --- a/desktop/dev-environments.md +++ b/desktop/dev-environments.md @@ -87,8 +87,8 @@ fi -1. Click **Create New Environment**. This opens the **Create a Dev Environment** dialog. Copy `https://github.com/dockersamples/single-dev-env.git` and add it to the **Repository URL** field on the **Remote Git Repository** tab. -2. Now, click **Create**. +1. Under Dev Environments, click **Create**. This opens the **Create a Dev Environment** dialog. Click **Get Started** and then copy `https://github.com/dockersamples/single-dev-env.git` and add it to the **Enter the Git Repository** field on the **Existing Git repo** source. +2. Now, click **Continue**. This clones the Git code inside a volume, determines the best image for your Dev Environment, and finally, opens VS Code inside the Dev Environment container. @@ -150,8 +150,8 @@ You can also use Dev Environments to collaborate on any Docker Compose-based pro > > When cloning a Git repository using SSH, ensure you've added your SSH key to the ssh-agent. To do this, open a terminal and run `ssh-add `. -1. Click **Create** to open the **Create a Dev Environment** dialog. Then, copy `https://github.com/dockersamples/compose-dev-env.git` and add it to the **Docker image** field on the **Remote** tab. -2. Click **Create**. This initializes the project and clones the Git code and builds the Compose application. This: +1. Under Dev Environments, click **Create**. This opens the **Create a Dev Environment** dialog. Click **Get Started** and then copy `https://github.com/dockersamples/compose-dev-env.git` and add it to the **Enter the Git Repository** field on the **Existing Git repo** source. +2. Click **Continue**. This initializes the project and clones the Git code and builds the Compose application. This: - Builds local images for services that are defined in the Compose file - Pulls images required for other services From 1ffb53ee8c590bc0771c3e488fef7a3a5a07e12c Mon Sep 17 00:00:00 2001 From: Usha Mandya Date: Fri, 8 Apr 2022 20:05:56 +0100 Subject: [PATCH 10/12] fix console output Signed-off-by: Usha Mandya --- engine/sbom/index.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/engine/sbom/index.md b/engine/sbom/index.md index c638f135c1..c41a65298c 100644 --- a/engine/sbom/index.md +++ b/engine/sbom/index.md @@ -15,7 +15,6 @@ A Software Bill Of Materials (SBOM) is analogous to a packing list for a shipmen The experimental `docker sbom` command allows you to generate the SBOM of a container image. Today, it does this by scanning the layers of the image using the [Syft project](https://github.com/anchore/syft) but in future it may read the SBOM from the image itself or elsewhere. - ## Simple use To output a tabulated SBOM for an image, use `docker sbom :`: @@ -23,8 +22,8 @@ To output a tabulated SBOM for an image, use `docker sbom :`: ```console $ docker sbom neo4j:4.4.5 Syft v0.43.0 - ✔ Loaded image - ✔ Parsed image + ✔ Loaded image + ✔ Parsed image ✔ Cataloged packages [385 packages] NAME VERSION TYPE @@ -79,8 +78,8 @@ By default, the command outputs the SBOM to stdout. You can save the output to a ```console $ docker sbom --format spdx-json --output sbom.json alpine:3.15 Syft v0.43.0 - ✔ Loaded image - ✔ Parsed image + ✔ Loaded image + ✔ Parsed image ✔ Cataloged packages [14 packages] $ cat sbom.json @@ -94,5 +93,5 @@ $ cat sbom.json ## Feedback -Thanks for trying the Docker SBOM CLI plugin. We’d love to hear from you. You can provide feedback and report any bugs through the Issues tracker in the [docker/[sbom-cli-plugin](https://github.com/docker/sbom-cli-plugin){: target="_blank" rel="noopener" class="_"} GitHub repository. - +Thanks for trying the Docker SBOM CLI plugin. We’d love to hear from you. You can provide feedback and report any bugs through the Issues tracker in the +[docker/sbom-cli-plugin](https://github.com/docker/sbom-cli-plugin){: target="_blank" rel="noopener" class="_"} GitHub repository. From 461c6935c4745e50d2ca9f479b225157897c0f45 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 12 Apr 2022 11:44:41 +0200 Subject: [PATCH 11/12] fix aligning in some output examples Signed-off-by: Sebastiaan van Stijn --- engine/swarm/swarm-tutorial/delete-service.md | 14 +++++++------- get-started/orchestration.md | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engine/swarm/swarm-tutorial/delete-service.md b/engine/swarm/swarm-tutorial/delete-service.md index 71b608c475..cefffc065b 100644 --- a/engine/swarm/swarm-tutorial/delete-service.md +++ b/engine/swarm/swarm-tutorial/delete-service.md @@ -37,15 +37,15 @@ you can delete the service from the swarm. ```console $ docker ps - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - db1651f50347 alpine:latest "ping docker.com" 44 minutes ago Up 46 seconds helloworld.5.9lkmos2beppihw95vdwxy1j3w - 43bf6e532a92 alpine:latest "ping docker.com" 44 minutes ago Up 46 seconds helloworld.3.a71i8rp6fua79ad43ycocl4t2 - 5a0fb65d8fa7 alpine:latest "ping docker.com" 44 minutes ago Up 45 seconds helloworld.2.2jpgensh7d935qdc857pxulfr - afb0ba67076f alpine:latest "ping docker.com" 44 minutes ago Up 46 seconds helloworld.4.1c47o7tluz7drve4vkm2m5olx - 688172d3bfaa alpine:latest "ping docker.com" 45 minutes ago Up About a minute helloworld.1.74nbhb3fhud8jfrhigd7s29we + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + db1651f50347 alpine:latest "ping docker.com" 44 minutes ago Up 46 seconds helloworld.5.9lkmos2beppihw95vdwxy1j3w + 43bf6e532a92 alpine:latest "ping docker.com" 44 minutes ago Up 46 seconds helloworld.3.a71i8rp6fua79ad43ycocl4t2 + 5a0fb65d8fa7 alpine:latest "ping docker.com" 44 minutes ago Up 45 seconds helloworld.2.2jpgensh7d935qdc857pxulfr + afb0ba67076f alpine:latest "ping docker.com" 44 minutes ago Up 46 seconds helloworld.4.1c47o7tluz7drve4vkm2m5olx + 688172d3bfaa alpine:latest "ping docker.com" 45 minutes ago Up About a minute helloworld.1.74nbhb3fhud8jfrhigd7s29we $ docker ps - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` diff --git a/get-started/orchestration.md b/get-started/orchestration.md index 61c67a0a68..a85ce7cc2e 100644 --- a/get-started/orchestration.md +++ b/get-started/orchestration.md @@ -214,7 +214,7 @@ Docker Desktop runs primarily on Docker Engine, which has everything you need to ```shell ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS - 463j2s3y4b5o demo.1 alpine:latest docker-desktop Running Running 8 seconds ago + 463j2s3y4b5o demo.1 alpine:latest docker-desktop Running Running 8 seconds ago ``` 4. Check that you get the logs you'd expect for a ping process: @@ -282,7 +282,7 @@ Docker Desktop runs primarily on Docker Engine, which has everything you need to ```shell ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS - 463j2s3y4b5o demo.1 alpine:latest docker-desktop Running Running 8 seconds ago + 463j2s3y4b5o demo.1 alpine:latest docker-desktop Running Running 8 seconds ago ``` 4. Check that you get the logs you'd expect for a ping process: From cc62b154b8f9bb1f9b8a3afffe4417198e11d638 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 12 Apr 2022 11:56:01 +0200 Subject: [PATCH 12/12] language/java: fix code-hint to use the correct language This block now shows java code, so changing the code-hint to make sure it's highlighted correctly. Signed-off-by: Sebastiaan van Stijn --- language/java/run-tests.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/language/java/run-tests.md b/language/java/run-tests.md index 6cfde2083f..5faf741ac5 100644 --- a/language/java/run-tests.md +++ b/language/java/run-tests.md @@ -151,14 +151,14 @@ The build output is truncated for simplicity, but you can see that our tests ran Open the `src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java` file and change the assertion -```shell - assertThat(violation.getMessage()).isEqualTo("must not be empty"); +```java +assertThat(violation.getMessage()).isEqualTo("must not be empty"); ``` with the following. -```shell - assertThat(violation.getMessage()).isEqualTo("must be empty"); +```java +assertThat(violation.getMessage()).isEqualTo("must be empty"); ``` Now, run the `docker build` command from above and observe that the build fails and the failing testing information is printed to the console.