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` 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 diff --git a/desktop/windows/release-notes/index.md b/desktop/windows/release-notes/index.md index 98c94ca43f..a413772c7b 100644 --- a/desktop/windows/release-notes/index.md +++ b/desktop/windows/release-notes/index.md @@ -86,6 +86,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 diff --git a/engine/sbom/index.md b/engine/sbom/index.md index adce1bdc18..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 @@ -90,8 +89,9 @@ $ cat sbom.json "spdxVersion": "SPDX-2.2", ... } +``` ## 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. 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 ``` 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 9f5089c928..a85ce7cc2e 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: 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) diff --git a/language/java/run-tests.md b/language/java/run-tests.md index 6d9bab7907..5faf741ac5 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 } +```java +assertThat(violation.getMessage()).isEqualTo("must not be empty"); +``` + +with the following. + +```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. 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: