From fbacec6a47ff709a1e3025a7463f16df9e463b51 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Sun, 29 Sep 2024 19:46:40 -0400 Subject: [PATCH 1/3] update shown contents of Spring project The Dockerfile and Dockerfile.multi are created in later steps. The `springbootdocker` directory appears to be named `spring_boot_docker` in current download. --- .../docker-concepts/building-images/multi-stage-builds.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content/get-started/docker-concepts/building-images/multi-stage-builds.md b/content/get-started/docker-concepts/building-images/multi-stage-builds.md index 6ddc5522e2..f2c90777bb 100644 --- a/content/get-started/docker-concepts/building-images/multi-stage-builds.md +++ b/content/get-started/docker-concepts/building-images/multi-stage-builds.md @@ -75,8 +75,6 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create ```plaintext spring-boot-docker - ├── Dockerfile - ├── Dockerfile.multi ├── HELP.md ├── mvnw ├── mvnw.cmd @@ -86,7 +84,7 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create │ ├── java │ │ └── com │ │ └── example - │ │ └── springbootdocker + │ │ └── spring_boot_docker │ │ └── SpringBootDockerApplication.java │ └── resources │ ├── application.properties @@ -96,10 +94,10 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create └── java └── com └── example - └── springbootdocker + └── spring_boot_docker └── SpringBootDockerApplicationTests.java - 15 directories, 9 files + 15 directories, 7 files ``` The `src/main/java` directory contains your project's source code, the `src/test/java` directory From acb62e77fc9aaefe49eb75ae20a3993f4a3e16a1 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Sun, 29 Sep 2024 19:49:22 -0400 Subject: [PATCH 2/3] fix references of `springbootdocker` Directory is `spring_boot_docker`, not `springbootdocker` --- .../docker-concepts/building-images/multi-stage-builds.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/get-started/docker-concepts/building-images/multi-stage-builds.md b/content/get-started/docker-concepts/building-images/multi-stage-builds.md index f2c90777bb..ea8f51710f 100644 --- a/content/get-started/docker-concepts/building-images/multi-stage-builds.md +++ b/content/get-started/docker-concepts/building-images/multi-stage-builds.md @@ -110,12 +110,12 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create 4. Create a RESTful web service that displays "Hello World!". - Under the `src/main/java/com/example/springbootdocker/` directory, you can modify your + Under the `src/main/java/com/example/spring_boot_docker/` directory, you can modify your `SpringBootDockerApplication.java` file with the following content: ```java - package com.example.springbootdocker; + package com.example.spring_boot_docker; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -139,7 +139,7 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create } ``` - The `SpringbootDockerApplication.java` file starts by declaring your `com.example.springbootdocker` package and importing necessary Spring frameworks. This Java file creates a simple Spring Boot web application that responds with "Hello World" when a user visits its homepage. + The `SpringbootDockerApplication.java` file starts by declaring your `com.example.spring_boot_docker` package and importing necessary Spring frameworks. This Java file creates a simple Spring Boot web application that responds with "Hello World" when a user visits its homepage. ### Create the Dockerfile From 3c5df97494a67d68fc177d74cc5f728f6ffa96dc Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Sun, 29 Sep 2024 19:57:41 -0400 Subject: [PATCH 3/3] update rendered output --- .../building-images/multi-stage-builds.md | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/content/get-started/docker-concepts/building-images/multi-stage-builds.md b/content/get-started/docker-concepts/building-images/multi-stage-builds.md index ea8f51710f..f50bd040dc 100644 --- a/content/get-started/docker-concepts/building-images/multi-stage-builds.md +++ b/content/get-started/docker-concepts/building-images/multi-stage-builds.md @@ -236,20 +236,21 @@ Now that you have the project, you’re ready to create the `Dockerfile`. You'll then see output similar to the following in the container log: ```plaintext - [INFO] --- spring-boot:3.3.0-M3:run (default-cli) @ spring-boot-docker --- + [INFO] --- spring-boot:3.3.4:run (default-cli) @ spring-boot-docker --- [INFO] Attaching agents: [] - . ____ _ __ _ _ - /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ - ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ - \\/ ___)| |_)| | | | | || (_| | ) ) ) ) - ' |____| .__|_| |_|_| |_\__, | / / / / - =========|_|==============|___/=/_/_/_/ - - :: Spring Boot :: (v3.3.0-M3) - - 2024-04-04T15:36:47.202Z INFO 42 --- [spring-boot-docker] [ main] - c.e.s.SpringBootDockerApplication : Starting SpringBootDockerApplication using Java - 21.0.2 with PID 42 (/app/target/classes started by root in /app) + + . ____ _ __ _ _ + /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ + ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/ ___)| |_)| | | | | || (_| | ) ) ) ) + ' |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + + :: Spring Boot :: (v3.3.4) + + 2024-09-29T23:54:07.157Z INFO 159 --- [spring-boot-docker] [ main] + c.e.s.SpringBootDockerApplication : Starting SpringBootDockerApplication using Java + 21.0.2 with PID 159 (/app/target/classes started by root in /app) …. ```