From 929daf72d6ec11df1837d75c9f2cf820b07458e2 Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Fri, 26 Nov 2021 21:32:20 -0500 Subject: [PATCH] Update run-tests.md Fixed a couple of typos. --- language/java/run-tests.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/java/run-tests.md b/language/java/run-tests.md index c22d9e20a1..6d9bab7907 100644 --- a/language/java/run-tests.md +++ b/language/java/run-tests.md @@ -98,7 +98,7 @@ $ docker run -it --rm --name springboot-test java-docker The build output is truncated, but you can see that the Maven test runner was successful and all our tests passed. -This is great. However, we'll have to run two Docker commands to build and run our tests. We can improve this slightly by using a `RUN` statement instead of the `CMD` statement in the test stage. The `CMD` statement is not executed during the building of the image, but is executed when you run the image in a container. When using the `RUN` statement, our tests run when the building the image, and stop the build when they fail. +This is great. However, we'll have to run two Docker commands to build and run our tests. We can improve this slightly by using a `RUN` statement instead of the `CMD` statement in the test stage. The `CMD` statement is not executed during the building of the image, but is executed when you run the image in a container. When using the `RUN` statement, our tests run when building the image, and stop the build when they fail. Update your Dockerfile with the highlighted line below. @@ -178,7 +178,7 @@ FROM base as development CMD ["./mvnw", "spring-boot:run", "-Dspring-boot.run.profiles=mysql", "-Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000'"] ``` -We can now update of our `docker-compose.dev.yml` to use this specific target to build the `petclinic` service and remove the `command` definition as follows: +We can now update our `docker-compose.dev.yml` to use this specific target to build the `petclinic` service and remove the `command` definition as follows: ```dockerfile services: