Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ services:
watch:
- action: sync
path: .
target: /src
target: /project
4 changes: 2 additions & 2 deletions content/contribute/components/call-outs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ is displayed in the callout.
> `docker compose down`. If you want to remove the volumes, you will need to add
> the `--volumes` flag.
>
> The Docker Dashboard does not remove volumes when you delete the app stack.
> The Docker Desktop Dashboard does not remove volumes when you delete the app stack.

> [!CAUTION]
>
Expand Down Expand Up @@ -96,7 +96,7 @@ Docker Scout is an [early access](/release-lifecycle/#early-access-ea) product.
> `docker compose down`. If you want to remove the volumes, you will need to add
> the `--volumes` flag.
>
> The Docker Dashboard does _not_ remove volumes when you delete the app stack.
> The Docker Desktop Dashboard does not remove volumes when you delete the app stack.

> [!CAUTION]
>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create

1. [Download and install](https://www.docker.com/products/docker-desktop/) Docker Desktop.

2. Open this [pre-initialized project](https://start.spring.io/#!type=maven-project&language=java&platformVersion=3.3.0-M3&packaging=jar&jvmVersion=21&groupId=com.example&artifactId=spring-boot-docker&name=spring-boot-docker&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.spring-boot-docker&dependencies=web) to generate a ZIP file. Here’s how that looks:
2. [Download and install](https://www.oracle.com/java/technologies/downloads/) Java.

3. Open this [pre-initialized project](https://start.spring.io/#!type=maven-project&language=java&platformVersion=3.4.0-M3&packaging=jar&jvmVersion=21&groupId=com.example&artifactId=spring-boot-docker&name=spring-boot-docker&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.spring-boot-docker&dependencies=web) to generate a ZIP file. Here’s how that looks:

![A screenshot of Spring Initializr tool selected with Java 21, Spring Web and Spring Boot 3.3.0](images/spring-initializr.webp?border=true)

![A screenshot of Spring Initializr tool selected with Java 21, Spring Web and Spring Boot 3.4.0](images/multi-stage-builds-spring-initializer.webp?border=true)


[Spring Initializr](https://start.spring.io/) is a quickstart generator for Spring projects. It provides an extensible API to generate JVM-based projects with implementations for several common concepts — like basic language generation for Java, Kotlin, and Groovy.
Expand All @@ -70,7 +72,7 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create
For this demonstration, you’ve paired Maven build automation with Java, a Spring Web dependency, and Java 21 for your metadata.


3. Navigate the project directory. Once you unzip the file, you'll see the following project directory structure:
4. Navigate the project directory. Once you unzip the file, you'll see the following project directory structure:


```plaintext
Expand Down Expand Up @@ -107,7 +109,7 @@ In this hands-on guide, you'll unlock the power of multi-stage builds to create
contains most of the information needed to build a customized project. The POM is huge and can seem
daunting. Thankfully, you don't yet need to understand every intricacy to use it effectively.

4. Create a RESTful web service that displays "Hello World!".
5. Create a RESTful web service that displays "Hello World!".


Under the `src/main/java/com/example/spring_boot_docker/` directory, you can modify your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ In this hands-on guide, you'll first see how to build and run a counter web appl
008e0ecf4f36 redis "docker-entrypoint.s…" About a minute ago Up About a minute 6379/tcp redis
```

7. If you look at the Docker Dashboard, you can see the containers and dive deeper into their configuration.
7. If you look at the Docker Desktop Dashboard, you can see the containers and dive deeper into their configuration.

![A screenshot of Docker Dashboard showing multi-container applications](images/multi-container-apps.webp?w=5000&border=true)
![A screenshot of the Docker Desktop Dashboard showing multi-container applications](images/multi-container-apps.webp?w=5000&border=true)

8. With everything up and running, you can open [http://localhost](http://localhost) in your browser to see the site. Refresh the page several times to see the host that’s handling the request and the total number of requests:

Expand All @@ -174,9 +174,9 @@ In this hands-on guide, you'll first see how to build and run a counter web appl
>
> You might have noticed that Nginx, acting as a reverse proxy, likely distributes incoming requests in a round-robin fashion between the two backend containers. This means each request might be directed to a different container (web1 and web2) on a rotating basis. The output shows consecutive increments for both the web1 and web2 containers and the actual counter value stored in Redis is updated only after the response is sent back to the client.

9. You can use the Docker Dashboard to remove the containers by selecting the containers and selecting the **Delete** button.
9. You can use the Docker Desktop Dashboard to remove the containers by selecting the containers and selecting the **Delete** button.

![A screenshot of Docker Dashboard showing how to delete the multi-container applications](images/delete-multi-container-apps.webp?border=true)
![A screenshot of Docker Desktop Dashboard showing how to delete the multi-container applications](images/delete-multi-container-apps.webp?border=true)

## Simplify the deployment using Docker Compose

Expand Down Expand Up @@ -204,14 +204,14 @@ Navigate to the root of the project directory. Inside this directory, you'll fin
✔ Container nginx-nodejs-redis-nginx-1 Started
```

2. If you look at the Docker Dashboard, you can see the containers and dive deeper into their configuration.
2. If you look at the Docker Desktop Dashboard, you can see the containers and dive deeper into their configuration.


![A screenshot of Docker Dashboard showing the containers of the application stack deployed using Docker Compose](images/list-containers.webp?border=true)
![A screenshot of the Docker Desktop Dashboard showing the containers of the application stack deployed using Docker Compose](images/list-containers.webp?border=true)

3. Alternatively, you can use the Docker Dashboard to remove the containers by selecting the application stack and selecting the **Delete** button.
3. Alternatively, you can use the Docker Desktop Dashboard to remove the containers by selecting the application stack and selecting the **Delete** button.

![A screenshot of Docker Dashboard that shows how to remove the containers that you deployed using Docker Compose](images/delete-containers.webp?border=true)
![A screenshot of Docker Desktop Dashboard that shows how to remove the containers that you deployed using Docker Compose](images/delete-containers.webp?border=true)


In this guide, you learned how easy it is to use Docker Compose to start and stop a multi-container application compared to `docker run` which is error-prone and difficult to manage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ In this hands-on guide, you'll see how to use the `docker run` command to overri

This will start another Postgres container in the background, listening on the standard postgres port `5432` in the container, but mapped to port `5433` on the host machine. You override the host port just to ensure that this new container doesn't conflict with the existing running container.

3. Verify that both containers are running by going to the **Containers** view in the Docker Dashboard.
3. Verify that both containers are running by going to the **Containers** view in the Docker Desktop Dashboard.

![A screenshot of Docker Dashboard showing the running instances of Postgres containers](images/running-postgres-containers.webp?border=true)
![A screenshot of the Docker Desktop Dashboard showing the running instances of Postgres containers](images/running-postgres-containers.webp?border=true)

### Run Postgres container in a controlled network

Expand Down Expand Up @@ -170,15 +170,15 @@ Sometimes, you might need to override the default commands (`CMD`) or entry poin

This command starts the Postgres service defined in the Docker Compose file.

3. Verify the authentication with Docker Dashboard.
3. Verify the authentication with Docker Desktop Dashboard.

Open the Docker Dashboard, select the **Postgres** container and select **Exec** to enter into the container shell. You can type the following command to connect to the Postgres database:
Open the Docker Desktop Dashboard, select the **Postgres** container and select **Exec** to enter into the container shell. You can type the following command to connect to the Postgres database:

```console
# psql -U postgres
```

![A screenshot of the Docker Dashboard selecting the Postgres container and entering into its shell using EXEC button](images/exec-into-postgres-container.webp?border=true)
![A screenshot of the Docker Desktop Dashboard selecting the Postgres container and entering into its shell using EXEC button](images/exec-into-postgres-container.webp?border=true)


> [!NOTE]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ In this guide, you’ll practice creating and using volumes to persist data crea

### View volume contents

The Docker Dashboard provides the ability to view the contents of any volume, as well as the ability to export, import, and clone volumes.
The Docker Desktop Dashboard provides the ability to view the contents of any volume, as well as the ability to export, import, and clone volumes.

1. Open the Docker Dashboard and navigate to the **Volumes** view. In this view, you should see the **postgres_data** volume.
1. Open the Docker Desktop Dashboard and navigate to the **Volumes** view. In this view, you should see the **postgres_data** volume.

2. Select the **postgres_data** volume’s name.

Expand All @@ -149,7 +149,7 @@ $ docker rm -f new-db

There are a few methods to remove volumes, including the following:

- Select the **Delete Volume** option on a volume in the Docker Dashboard.
- Select the **Delete Volume** option on a volume in the Docker Desktop Dashboard.
- Use the `docker volume rm` command:

```console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ In this step, you will run a container and publish its port using the Docker CLI

The first `8080` refers to the host port. This is the port on your local machine that will be used to access the application running inside the container. The second `80` refers to the container port. This is the port that the application inside the container listens on for incoming connections. Hence, the command binds to port `8080` of the host to port `80` on the container system.

3. Verify the published port by going to the **Containers** view of the Docker Dashboard.
3. Verify the published port by going to the **Containers** view of the Docker Desktop Dashboard.

![A screenshot of Docker dashboard showing the published port](images/published-ports.webp?w=5000&border=true)
![A screenshot of Docker Desktop Dashboard showing the published port](images/published-ports.webp?w=5000&border=true)

4. Open the website by either selecting the link in the **Port(s)** column of your container or visiting [http://localhost:8080](http://localhost:8080) in your browser.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ In this hands-on guide, you’ll practice how to create and use a bind mount to

Using a bind mount, you can map the configuration file on your host computer to a specific location within the container. In this example, you’ll see how to change the look and feel of the webpage by using bind mount:

1. Delete the existing container by using the Docker Dashboard:
1. Delete the existing container by using the Docker Desktop Dashboard:

![A screenshot of Docker dashboard showing how to delete the httpd container](images/delete-httpd-container.webp?border=true)
![A screenshot of Docker Desktop Dashboard showing how to delete the httpd container](images/delete-httpd-container.webp?border=true)


2. Create a new directory called `public_html` on your host system.
Expand Down Expand Up @@ -157,44 +157,40 @@ Using a bind mount, you can map the configuration file on your host computer to
With everything now up and running, you should be able to access the site via [http://localhost:8080](http://localhost:8080) and find a new webpage that welcomes you with a friendly whale.


### Access the file on the Docker Dashboard
### Access the file on the Docker Desktop Dashboard

1. You can view the mounted files inside a container by selecting the container's **Files** tab and then selecting a file inside the `/usr/local/apache2/htdocs/` directory. Then, select **Open file editor**.


![A screenshot of Docker dashboard showing the mounted files inside the a container](images/mounted-files.webp?border=true)
![A screenshot of Docker Desktop Dashboard showing the mounted files inside the a container](images/mounted-files.webp?border=true)

2. Delete the file on the host and verify the file is also deleted in the container. You will find that the files no longer exist under **Files** in the Docker Dashboard.
2. Delete the file on the host and verify the file is also deleted in the container. You will find that the files no longer exist under **Files** in the Docker Desktop Dashboard.


![A screenshot of Docker dashboard showing the deleted files inside the a container](images/deleted-files.webp?border=true)
![A screenshot of Docker Desktop Dashboard showing the deleted files inside the a container](images/deleted-files.webp?border=true)


3. Recreate the HTML file on the host system and see that file re-appears under the **Files** tab under **Containers** on the Docker Dashboard. By now, you will be able to access the site too.
3. Recreate the HTML file on the host system and see that file re-appears under the **Files** tab under **Containers** on the Docker Desktop Dashboard. By now, you will be able to access the site too.



### Stop your container

The container continues to run until you stop it.

1. Go to the **Containers** view in the Docker Dashboard.
1. Go to the **Containers** view in the Docker Desktop Dashboard.

2. Locate the container you'd like to stop.

3. Select the **Delete** action in the Actions column.




![A screenshot of Docker dashboard showing how to delete the container](images/delete-the-container.webp?border=true)
![A screenshot of Docker Desktop Dashboard showing how to delete the container](images/delete-the-container.webp?border=true)


## Additional resources

The following resources will help you learn more about bind mounts:


* [Manage data in Docker](/storage/)
* [Volumes](/storage/volumes/)
* [Bind mounts](/storage/bind-mounts/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Use the following instructions to run a container.

2. Specify `welcome-to-docker` in the search input and then select the **Pull** button.

![A screenshot of the Docker Dashboard showing the search result for welcome-to-docker Docker image ](images/search-the-docker-image.webp?border=true&w=1000&h=700)
![A screenshot of the Docker Desktop Dashboard showing the search result for welcome-to-docker Docker image ](images/search-the-docker-image.webp?border=true&w=1000&h=700)

3. Once the image is successfully pulled, select the **Run** button.

Expand All @@ -66,15 +66,15 @@ Use the following instructions to run a container.

6. In the **Host port**, specify `8080`.

![A screenshot of Docker Dashboard showing the container run dialog with welcome-to-docker typed in as the container name and 8080 specified as the port number](images/run-a-new-container.webp?border=true&w=550&h=400)
![A screenshot of Docker Desktop Dashboard showing the container run dialog with welcome-to-docker typed in as the container name and 8080 specified as the port number](images/run-a-new-container.webp?border=true&w=550&h=400)

7. Select **Run** to start your container.

Congratulations! You just ran your first container! 🎉

### View your container

You can view all of your containers by going to the **Containers** view of the Docker Dashboard.
You can view all of your containers by going to the **Containers** view of the Docker Desktop Dashboard.

![Screenshot of the container view of the Docker Desktop GUI showing the welcome-to-docker container running on the host port 8080](images/view-your-containers.webp?border=true&w=750&h=600)

Expand All @@ -92,25 +92,25 @@ For this container, the frontend is accessible on port `8080`. To open the websi

Docker Desktop lets you explore and interact with different aspects of your container. Try it out yourself.

1. Go to the **Containers** view in the Docker Dashboard.
1. Go to the **Containers** view in the Docker Desktop Dashboard.

2. Select your container.

3. Select the **Files** tab to explore your container's isolated file system.

![Screenshot of the Docker Dashboard showing the files and directories inside a running container](images/explore-your-container.webp?border)
![Screenshot of the Docker Desktop Dashboard showing the files and directories inside a running container](images/explore-your-container.webp?border)

### Stop your container

The `docker/welcome-to-docker` container continues to run until you stop it.

1. Go to the **Containers** view in the Docker Dashboard.
1. Go to the **Containers** view in the Docker Desktop Dashboard.

2. Locate the container you'd like to stop.

3. Select the **Stop** action in the **Actions** column.

![Screenshot of the Docker Dashboard with the welcome container selected and being prepared to stop](images/stop-your-container.webp?border)
![Screenshot of the Docker Desktop Dashboard with the welcome container selected and being prepared to stop](images/stop-your-container.webp?border)

{{< /tab >}}
{{< tab name="Using the CLI" >}}
Expand Down
Loading
Loading