remove walkthroughs (#20076)

Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
This commit is contained in:
Craig Osterhout 2024-05-22 08:00:26 -07:00 committed by GitHub
parent 4bde05401a
commit f856b304c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
56 changed files with 50 additions and 799 deletions

View File

@ -83,6 +83,6 @@ $ sudo apt-get install ./docker-desktop-<version>-<arch>.deb
## Next steps
- Take a look at the [Get started](../../guides/get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- Take a look at the [Get started](../../get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker.

View File

@ -72,6 +72,6 @@ $ sudo dnf install ./docker-desktop-<version>-<arch>.rpm
## Next steps
- Take a look at the [Get started](../../guides/get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- Take a look at the [Get started](../../get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker.

View File

@ -240,7 +240,7 @@ Sign out and sign back in so that your group membership is re-evaluated.
## Where to go next
- Explore [Docker's core subscriptions](https://www.docker.com/pricing/) to see what Docker can offer you.
- [Get started with Docker](../../guides/get-started/_index.md).
- [Get started with Docker](../../get-started/_index.md).
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- [Troubleshooting](../troubleshoot/overview.md) describes common problems, workarounds, how to run and submit diagnostics, and submit issues.
- [FAQs](../faqs/general.md) provide answers to frequently asked questions.

View File

@ -123,7 +123,7 @@ The `install` command accepts the following flags:
## Where to go next
- Explore [Docker's core subscriptions](https://www.docker.com/pricing/) to see what Docker can offer you.
- [Get started with Docker](../../guides/get-started/_index.md).
- [Get started with Docker](../../get-started/_index.md).
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- [Troubleshooting](../troubleshoot/overview.md) describes common problems, workarounds, how
to run and submit diagnostics, and submit issues.

View File

@ -134,6 +134,6 @@ $ sudo dnf install ./docker-desktop-<version>-<arch>-rhel.rpm
## Next steps
- Take a look at the [Get started](../../guides/get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- Take a look at the [Get started](../../get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker.

View File

@ -87,6 +87,6 @@ $ sudo apt-get install ./docker-desktop-<version>-<arch>.deb
## Next steps
- Take a look at the [Get started](../../guides/get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- Take a look at the [Get started](../../get-started/_index.md) training modules to learn how to build an image and run it as a containerized application.
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- Review the topics in [Develop with Docker](../../develop/index.md) to learn how to build new applications using Docker.

View File

@ -255,7 +255,7 @@ Docker Desktop does not start automatically after installation. To start Docker
## Where to go next
- Explore [Docker's core subscriptions](https://www.docker.com/pricing/) to see what Docker can offer you.
- [Get started with Docker](../../guides/get-started/_index.md).
- [Get started with Docker](../../get-started/_index.md).
- [Explore Docker Desktop](../use-desktop/index.md) and all its features.
- [Troubleshooting](../troubleshoot/overview.md) describes common problems, workarounds, and
how to get support.

View File

@ -127,6 +127,5 @@ can also:
## Additional resources
- [What is a container](../../guides/walkthroughs/what-is-a-container.md)
- [Run a container](../../guides/walkthroughs/run-a-container.md)
- [Run multi-container applications](../../guides/walkthroughs/multi-container-apps.md)
- [What is a container](../../guides/docker-concepts/the-basics/what-is-a-container.md)
- [Run multi-container applications](../../guides/docker-concepts/running-containers/multi-container-applications.md)

View File

@ -102,5 +102,4 @@ Hovering over an image tag reveals two options:
## Additional resources
- [Run Docker Hub images](../../guides/walkthroughs/run-hub-images.md)
- [Publish your image](../../guides/walkthroughs/publish-your-image.md)
- [What is an image?](../../guides/docker-concepts/the-basics/what-is-an-image.md)

View File

@ -174,5 +174,5 @@ to confirm.
## Additional resources
- [Persist container data](../../guides/walkthroughs/persist-data.md)
- [Persisting container data](../../guides/docker-concepts/running-containers/persisting-container-data.md)
- [Use volumes](../../storage/volumes.md)

View File

@ -2,6 +2,8 @@
title: Use bind mounts
keywords: 'get started, setup, orientation, quickstart, intro, concepts, containers, docker desktop'
description: Using bind mounts in our application
aliases:
- /guides/walkthroughs/access-local-folder/
---
In [part 5](./05_persisting_data.md), you used a volume mount to persist the

View File

@ -58,6 +58,7 @@ aliases:
- /windows/step_six/
- /windows/step_three/
- /windows/step_two/
- /guides/get-started/
---
This guide contains step-by-step instructions on how to get started with Docker. This guide shows you how to:

View File

@ -11,7 +11,7 @@ get-started:
icon: summarize
- title: Get started
description: Get started with the basics and the benefits of containerizing your applications.
link: /guides/get-started/
link: /get-started/
icon: rocket
- title: Docker concepts
description: Gain a better understanding of foundational Docker concepts.

View File

@ -216,6 +216,5 @@ In this guide, you learned how easy it is to use Docker Compose to start and sto
## Additional resources
* [`docker container run` CLI reference](reference/cli/docker/container/run/)
* [Run multi-container applications](/guides/walkthroughs/multi-container-apps/)
* [What is Docker Compose](/guides/docker-concepts/the-basics/what-is-docker-compose/)

View File

@ -2,6 +2,8 @@
title: Persisting container data
keywords: concepts, build, images, container, docker desktop
description: This concept page will teach you the significance of data persistence in Docker
aliases:
- /guides/walkthroughs/persist-data/
---
{{< youtube-embed 10_2BjqB_Ls >}}

View File

@ -2,6 +2,10 @@
title: What is a container?
keywords: concepts, build, images, container, docker desktop
description: What is a container? This concept page will teach you about containers and provide a quick hands-on where you will run your first container.
aliases:
- /guides/walkthroughs/what-is-a-container/
- /guides/walkthroughs/run-a-container/
- /guides/walkthroughs/
---
{{< youtube-embed W1kWqFkiu7k >}}

View File

@ -2,6 +2,9 @@
title: What is a registry?
keywords: concepts, build, images, container, docker desktop
description: What is a registry? This Docker Concept will explain what a registry is, explore their interoperability, and have you interact with registries.
aliases:
- /guides/walkthroughs/run-hub-images/
- /guides/walkthroughs/publish-your-image/
---
{{< youtube-embed 2WDl10Wv5rs >}}

View File

@ -2,6 +2,8 @@
title: What is Docker Compose?
keywords: concepts, build, images, container, docker desktop
description: What is Docker Compose?
aliases:
- /guides/walkthroughs/multi-container-apps/
---
{{< youtube-embed xhcUIK4fGtY >}}

View File

@ -1,57 +0,0 @@
---
title: Overview of get started
keywords: get started, quick start, intro, concepts
description: Find quick, hands-on guides on containerization concepts and how to use Docker Desktop
aliases:
- /guides/walkthroughs/
grid:
- title: "What is a container?"
link: "/guides/walkthroughs/what-is-a-container/"
image: "/guides/walkthroughs/images/what-is-a-container.webp"
- title: "Run a container"
image: "/guides/walkthroughs/images/how-do-i-run-a-container.webp"
link: "/guides/walkthroughs/run-a-container/"
- title: "Run Docker Hub images"
image: "/guides/walkthroughs/images/run-docker-hub-images.webp"
link: "/guides/walkthroughs/run-hub-images/"
- title: "Multi-container apps"
image: "/guides/walkthroughs/images/multi-container-apps.webp"
link: "/guides/walkthroughs/multi-container-apps/"
- title: "Persist container data"
link: "/guides/walkthroughs/persist-data/"
image: "/guides/walkthroughs/images/persist-data.webp"
- title: "Access a local folder"
link: "/guides/walkthroughs/access-local-folder/"
image: "/guides/walkthroughs/images/bind-mounts.webp"
- title: "Containerize your application"
link: "/guides/walkthroughs/containerize-your-app/"
image: "/guides/walkthroughs/images/containerize-app.webp"
- title: "Publish your image to Docker Hub"
link: "/guides/walkthroughs/publish-your-image/"
image: "/guides/walkthroughs/images/publish-your-images.webp"
aliases:
- /get-started/hands-on-overview/
---
## Quick hands-on guides
Let these 5-minute hands-on guides show you around Docker Desktop and introduce you to containerization concepts.
{{< grid cols=2 >}}
> **Note**
>
> These hands-on guides are also available as interactive walkthroughs inside
> Docker Desktop's learning center.
## Getting started guide
Dive deeper into Docker and containerization concepts in this end-to-end guide.
{{< card
title="Getting started guide"
link=/get-started/
description="A 45-minute guide where you start by containerizing a simple application and then follow along to develop it into a multi-container application."
icon="/assets/images/rocket.svg"
>}}

View File

@ -179,7 +179,7 @@ The following image shows the application's high-level service architecture, whi
The application uses Docker to run the application in containers, providing a
consistent and isolated environment for running it. This means the application
will operate as intended within its Docker containers, regardless of the
underlying system differences. To learn more about Docker, see the [Getting started overview](../../get-started/_index.md).
underlying system differences. To learn more about Docker, see the [Getting started overview](../../../get-started/_index.md).
Docker Compose is a tool for defining and running multi-container applications.
Compose makes it easy to run this application with a single command, `docker

View File

@ -1,91 +0,0 @@
---
title: Access a local folder from a container
keywords: get started, quick start, intro, concepts
description: Learn how to access a local folder from a container
---
This walkthrough shows you how to access a local folder from a container. To better understand some concepts in this walkthrough, complete the [Run multi-container applications](./multi-container-apps.md) walkthrough first.
Docker isolates all content, code, and data in a container from your local filesystem. By default, containers can't access directories in your local filesystem.
![Data isolation diagram](images/getting-started-isolation.webp?w=400)
Sometimes, you may want to access a directory from your local filesystem. To do this, you can use bind mounts.
{{< include "guides-get-docker.md" >}}
## Step 1: Get the sample application
If you have git, you can clone the repository for the sample application. Otherwise, you can download the sample application. Choose one of the following options.
{{< tabs >}}
{{< tab name="Clone with git" >}}
Use the following command in a terminal to clone the sample application repository.
```console
$ git clone https://github.com/docker/bindmount-apps
```
{{< /tab >}}
{{< tab name="Download" >}}
Download the source and extract it.
{{< button url="https://github.com/docker/bindmount-apps/archive/refs/heads/main.zip" text="Download the source" >}}
{{< /tab >}}
{{< /tabs >}}
## Step 2: Add a bind mount using Compose
Add a bind mount to access data on your system from a container. A bind mount lets you share a directory from your host's filesystem into the container.
![Bind mount diagram](images/getting-started-bindmount.webp?w=400)
To add a bind mount to this project, open the `compose.yaml` file in a code or text editor, and then uncomment the following lines.
```yaml
todo-app:
# ...
volumes:
- ./app:/usr/src/app
- /usr/src/app/node_modules
```
The `volumes` element tells Compose to mount the local folder `./app` to `/usr/src/app` in the container for the `todo-app` service. This particular bind mount overwrites the static contents of the `/usr/src/app` directory in the container and creates what is known as a development container. The second instruction, `/usr/src/app/node_modules`, prevents the bind mount from overwriting the container's `node_modules` directory to preserve the packages installed in the container.
## Step 3: Run the application
In a terminal, run the following commands to bring up your application. Replace `/path/to/bindmount-apps/` with the path to your application's directory.
{{< include "open-terminal.md" >}}
```console
$ cd /path/to/bindmount-apps/
```
```console
$ docker compose up -d
```
## Step 4: Develop the application
Now, you can take advantage of the containers environment while you develop the application on your local system. Any changes you make to the application on your local system are reflected in the container. In your local directory, open `app/views/todos.ejs` in a code or text editor, update the `Enter your task` string, and save the file. Visit or refresh [localhost:3001](http://localhost:3001) to view the changes.
## Summary
In this walkthrough, you added a bind mount to access a local folder from a container. You can use this to develop faster without having to rebuild your container when updating your code.
Related information:
- Deep dive into [bind mounts](../../storage/bind-mounts.md)
- Learn about using bind mounts in Compose in the [Compose file reference](../../compose/compose-file/_index.md)
- Explore using bind mounts via the CLI in the [Docker run reference](/reference/cli/docker/container/run/#mount)
## Next steps
Continue to the next walkthrough to learn how you can containerize your own application.
{{< button url="./containerize-your-app.md" text="Containerize your app" >}}

View File

@ -1,58 +0,0 @@
---
title: Containerize your application
keywords: get started, quick start, intro, concepts
description: Learn how to containerize your application.
---
When working with containers, you typically need to create a `Dockerfile` to define your image and a `compose.yaml` file to define how to run it.
To help you create these files, Docker Desktop has the `docker init` command. Run this command in a terminal within your project folder. `docker init` creates all the required files to containerize your application. This walkthrough shows you how this works.
{{< include "guides-get-docker.md" >}}
## Step 1: Run the command to create Docker assets
Choose one of your own applications that you would like to containerize, and in a terminal, run the following commands. Replace `/path/to/your/project/` with the directory containing your project.
{{< include "open-terminal.md" >}}
```console
$ cd /path/to/your/project/
```
```console
$ docker init
```
## Step 2: Follow the on-screen prompts
`docker init` walks you through a few questions to configure your project with sensible defaults. Specify your answers and press `Enter`.
## Step 3: Try to run your application
Once you have answered all the questions, run the following commands in a terminal to run your project. Replace `/path/to/your/project/` with the directory containing your project.
```console
$ cd /path/to/your/project/
```
```console
$ docker compose up
```
## Step 4: Update the Docker assets
The `docker init` command tries its best to do the heavy lifting for you, but sometimes there's some assembly required. In this case, you can refer to the [Dockerfile reference](/reference/dockerfile/) and [Compose file reference](/compose/compose-file/) to learn how to update the files created by `docker init`.
## Summary
In this walkthrough, you learned how to containerize your own application.
Related information:
- Read more about [docker init](../../reference/cli/docker/init.md)
- Learn more about Docker assets in the [Dockerfile reference](/reference/dockerfile/) and [Compose file reference](/compose/compose-file/)
## Next steps
Continue to the next walkthrough to learn how to publish an application as an image on Docker Hub.
{{< button url="./publish-your-image.md" text="Publish your image" >}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

View File

@ -1,116 +0,0 @@
---
title: Run multi-container applications
keywords: get started, quick start, intro, concepts
description: Learn how to use Docker to run multi-container applications
---
If you've already completed the [How do I run a container?](./run-a-container.md) walkthrough, you learned that you must start each container individually. Imagine how great it would be if a tool could start multiple containers with a single command. That tool is Docker Compose.
{{< include "guides-get-docker.md" >}}
## Step 1: Get the sample application
If you have git, you can clone the repository for the sample application. Otherwise, you can download the sample application. Choose one of the following options.
{{< tabs >}}
{{< tab name="Clone with git" >}}
Use the following command in a terminal to clone the sample application repository.
```console
$ git clone https://github.com/docker/multi-container-app
```
{{< /tab >}}
{{< tab name="Download" >}}
Download the source and extract it.
{{< button url="https://github.com/docker/multi-container-app/archive/refs/heads/main.zip" text="Download the source" >}}
{{< /tab >}}
{{< /tabs >}}
The sample application is a simple todo application built using ExpressJS and Node.js. The application saves all todos in a MongoDB database. You don't need to know any of these technologies to continue with the walkthrough.
![The sample app architecture](images/getting-started-multi-container.webp?w=450&border=true)
## Step 2: Dig into the Compose file
View the files of the sample application. Notice that it has a `compose.yaml` file. This file tells Docker how to run your application. Open the `compose.yaml` file in a code or text editor to view what it contains.
## Step 3: Run the application
To run the multi-container application, open a terminal and run the following commands. Replace `/path/to/multi-container-app/` with the path to your application's directory.
{{< include "open-terminal.md" >}}
```console
$ cd /path/to/multi-container-app/
```
```console
$ docker compose up -d
```
In the previous command, the `-d` flag tells Docker Compose to run in detached mode.
## Step 4: View the frontend and add todos
In the **Containers** tab of Docker Desktop, you should now have an application stack with two containers running (the todo-app, and todo-database).
To view the frontend:
1. In Docker Desktop, expand the application stack in **Containers**.
2. Select the link to port **3000** in the **Port(s)** column or open [http://localhost:3000](http://localhost:3000).
Add some todo tasks in the frontend, and then open [http://localhost:3000](http://localhost:3000) in a new browser tab. Notice that the tasks are still visible.
## Step 5: Develop in your containers
When developing with Docker, you may need to automatically update and preview your running services as you edit and save your code. You can use Docker Compose Watch for this.
To run Compose Watch and see the real-time changes:
1. Open a terminal and run the following commands. Replace `/path/to/multi-container-app/` with the path to your application's directory.
```console
$ cd /path/to/multi-container-app/
```
```console
$ docker compose watch
```
2. Open `app/views/todos.ejs` in a text or code editor, then change the text on line 21.
3. Save the changes in `app/views/todos.ejs`.
4. View your application at [http://localhost:3000](http://localhost:3000) to see the changes in real-time.
## Step 6: Delete everything and start over
Having your configuration stored in a Compose file has another advantage, you can easily delete everything and start over.
To delete the application stack:
1. Open the **Containers** tab of Docker Desktop
2. Select the Delete icon next to your application stack.
![Deleting the application stack](images/getting-started-delete-stack.webp?border=true)
After you delete the application stack, follow the steps from [Step 3: Run the
application](#step-3-run-the-application) to run the application again. Note
that when you delete the containers and run them again, any todos that you
created don't persist.
## Summary
In this walkthrough, you ran a multi-container application with Docker Compose. You also learned how to develop in containers and how to delete the application stack along with all of the data.
Related information:
- Deep dive into the [Docker Compose manual](../../compose/_index.md)
- Reference Compose commands in the [Docker Compose CLI reference](../../compose/reference/_index.md)
- Explore samples in the [Awesome Compose GitHub repository](https://github.com/docker/awesome-compose)
- Learn how to implement Compose Watch for your projects in [Use Compose Watch](../../compose/file-watch.md)
## Next steps
Continue to the next walkthrough to learn how to persist data even after deleting the application stack.
{{< button url="./persist-data.md" text="Persist container data" >}}

View File

@ -1,115 +0,0 @@
---
title: Persist container data
keywords: get started, quick start, intro, concepts
description: Learn how to persist container data
---
This walkthrough shows you how to persist data between containers. To better understand some concepts in this walkthrough, complete the [Run multi-container applications](./multi-container-apps.md) walkthrough first.
Docker isolates all content, code, and data in a container from your local filesystem. When you delete a container, Docker deletes all the content within that container.
![Data isolation diagram](images/getting-started-isolation.webp?w=400)
Sometimes, you may want to persist the data that a container generates. To do this, you can use volumes.
{{< include "guides-get-docker.md" >}}
## Step 1: Get the sample application
If you have git, you can clone the repository for the sample application. Otherwise, you can download the sample application. Choose one of the following options.
{{< tabs >}}
{{< tab name="Clone with git" >}}
Use the following command in a terminal to clone the sample application repository.
```console
$ git clone https://github.com/docker/multi-container-app
```
{{< /tab >}}
{{< tab name="Download" >}}
Download the source and extract it.
{{< button url="https://github.com/docker/multi-container-app/archive/refs/heads/main.zip" text="Download the source" >}}
{{< /tab >}}
{{< /tabs >}}
## Step 2: Add a volume to persist data
To persist data after you delete a container, use a volume. A volume is a location in your local filesystem, automatically managed by Docker Desktop.
![Volume diagram](images/getting-started-volume.webp?w=400)
To add a volume to this project, open the `compose.yaml` file in a code or text editor, and then uncomment the following lines.
```yaml
todo-database:
# ...
volumes:
- database:/data/db
# ...
volumes:
database:
```
The `volumes` element that is nested under `todo-database` tells Compose to mount the volume named `database` to `/data/db` in the container for the todo-database service.
The top-level `volumes` element defines and configures a volume named `database` that can be used by any of the services in the Compose file.
## Step 3: Run the application
To run the multi-container application, open a terminal and run the following commands. Replace `/path/to/multi-container-app/` with the path to your application's directory.
{{< include "open-terminal.md" >}}
```console
$ cd /path/to/multi-container-app/
```
```console
$ docker compose up -d
```
## Step 4: View the frontend and add todos
In the **Containers** tab of Docker Desktop, you should now have an application stack with two containers running (the todo-app, and todo-database).
To view the frontend and add todos:
1. In Docker Desktop, expand the application stack in **Containers**.
2. Select the link to port **3000** in the **Port(s)** column or open [http://localhost:3000](http://localhost:3000).
3. Add some todo tasks in the frontend.
## Step 5: Delete the application stack and run new containers
Now, no matter how often you delete and recreate the containers, Docker Desktop persists your data and it's accessible to any container on your system by mounting the `database` volume. Docker Desktop looks for the `database` volume and creates it if it doesn't exist.
To delete the application stack:
1. Open the **Containers** tab of Docker Desktop
2. Select the Delete icon next to your application stack.
![Deleting the application stack](images/getting-started-delete-stack.webp?border=true)
After you delete the application stack, follow the steps from [Step 3: Run the
application](#step-3-run-the-application) to run the application again. Note
that when you delete the containers and run them again, Docker Desktop persists any todos that you created.
## Summary
In this walkthrough, you persisted data between containers using a volume. You can use this to persist and share data among isolated and ephemeral containers.
Related information:
- Deep dive into [volumes](../../storage/volumes.md)
- Learn about using volumes in Compose in the [Compose file reference](../../compose/compose-file/_index.md)
- Explore using volumes via the CLI in the [docker volume CLI reference](../../reference/cli/docker/volume/create.md) and [Docker run reference](/reference/run/)
## Next steps
Continue to the next walkthrough to learn how you can access a local directory from a container.
{{< button url="./access-local-folder.md" text="Access a local folder" >}}

View File

@ -1,71 +0,0 @@
---
title: Publish your image
keywords: get started, quick start, intro, concepts
description: Learn how to publish your image to Docker Hub
aliases:
- /get-started/publish-your-own-image/
---
Follow this walkthrough to learn how to publish and share your images on Docker Hub.
{{< include "guides-get-docker.md" >}}
## Step 1: Get the example image
To get the example image:
1. In Docker Desktop, select the search bar.
2. In the search bar, specify `docker/welcome-to-docker`.
3. Select **Pull** to pull the image from Docker Hub to your computer.
![Search Docker Desktop for the welcome-to-docker image](images/getting-started-search.webp?w=650&border=true)
## Step 2: Sign in to Docker
Select **Sign in** on the top-right of Docker Desktop to either sign in or create a new Docker account.
![Signing in to Docker Desktop](images/getting-started-signin.webp?w=300&border=true)
## Step 3: Rename your image
Before you can publish your image, you need to rename it so that Docker Hub knows that the image is yours. In a terminal, run the following command to rename your image. Replace `YOUR-USERNAME` with your Docker ID.
{{< include "open-terminal.md" >}}
```console
$ docker tag docker/welcome-to-docker YOUR-USERNAME/welcome-to-docker
```
## Step 4: Push your image to Docker Hub
To push your image to Docker Hub:
1. In Docker Desktop, go to the **Images** tab
2. In the **Actions** column for your image, select the **Show image actions** icon.
3. Select **Push to Hub**.
![Pushing an image to Docker Hub](images/getting-started-push.webp?border=true)
Go to [Docker Hub](https://hub.docker.com) and verify that the list of your repositories now contains `YOUR-USERNAME/welcome-to-docker`.
## Summary
In this walkthrough, you pushed and shared an image on Docker Hub.
Related information:
- Deep dive into the [Docker Hub manual](../../docker-hub/_index.md)
- Learn more about the [docker tag](../../reference/cli/docker/image/tag.md)
command
## Next steps
Continue to the language-specific guides to learn how you can use Docker to containerize and develop applications in your favorite language. Choose one of the following guides.
- [C# (.NET)](../../language/dotnet/_index.md)
- [Go](../../language/golang/_index.md)
- [Java](../../language/java/_index.md)
- [Node.js](../../language/nodejs/_index.md)
- [PHP](../../language/php/_index.md)
- [Python](../../language/python/_index.md)
- [Rust](../../language/rust/_index.md)

View File

@ -1,91 +0,0 @@
---
title: How do I run a container?
keywords: get started, quick start, intro, concepts
description: Learn how to build your own image and run it as a container
aliases:
- /get-started/run-your-own-container/
---
In this walkthrough, you'll learn the basic steps of building an image and running your own container. This walkthrough uses a sample Node.js application, but it's not necessary to know Node.js.
![Running an image in Docker Desktop](images/getting-started-run-intro.webp?w=450&border=true)
{{< include "guides-get-docker.md" >}}
## Step 1: Get the sample application
If you have git, you can clone the repository for the sample application. Otherwise, you can download the sample application. Choose one of the following options.
{{< tabs >}}
{{< tab name="Clone with git" >}}
Use the following command in a terminal to clone the sample application repository.
```console
$ git clone https://github.com/docker/welcome-to-docker
```
{{< /tab >}}
{{< tab name="Download" >}}
Download the source and extract it.
{{< button url="https://github.com/docker/welcome-to-docker/archive/refs/heads/main.zip" text="Download the source" >}}
{{< /tab >}}
{{< /tabs >}}
## Step 2: View the Dockerfile in your project folder
To run your code in a container, the most fundamental thing you need is a
Dockerfile. A Dockerfile describes what goes into a container. This sample already contains a `Dockerfile`. For your own projects, you'll need to create your own `Dockerfile`. You can open the `Dockerfile` in a code or text editor and explore its contents.
## Step 3: Build your first image
You always need an image to run a container. In a terminal, run the following commands to build the image. Replace `/path/to/welcome-to-docker/` with the path to your `welcome-to-docker` directory.
{{< include "open-terminal.md" >}}
```console
$ cd /path/to/welcome-to-docker/
```
```console
$ docker build -t welcome-to-docker .
```
In the previous command, the `-t` flag tags your image with a name,
`welcome-to-docker` in this case. And the `.` lets Docker know where it can find
the Dockerfile.
Building the image may take some time. After your image is built, you can view your image in the **Images** tab in Docker Desktop.
## Step 4: Run your container
To run your image as a container:
1. In Docker Desktop, go to the **Images** tab.
2. Next to your image, select **Run**.
3. Expand the **Optional settings**.
4. In **Host port**, specify `8089`.
![Specifying host port 8089](images/getting-started-run-image.webp?w=500&border=true)
5. Select **Run**.
## Step 5: View the frontend
You can use Docker Desktop to access your running container. Select the link next to your container in Docker Desktop or go to [http://localhost:8089](http://localhost:8089) to view the frontend.
![Selecting the container link](images/getting-started-frontend-2.webp?border=true)
## Summary
In this walkthrough, you built your own image and ran it as a container. In addition to building and running your own images, you can run images from Docker Hub.
Related information:
- Deep dive into building images in the [Build with Docker guide](../../build/guide/_index.md)
## Next steps
Continue to the next walkthrough to learn how you can run one of over 100,000 pre-made images from Docker Hub.
{{< button url="./run-hub-images.md" text="Run Docker Hub images" >}}

View File

@ -1,63 +0,0 @@
---
title: Run Docker Hub images
keywords: get started, quick start, intro, concepts
description: Learn how to run Docker Hub images
aliases:
- /get-started/run-docker-hub-images/
---
You can share and store images in Docker Hub
([http://hub.docker.com](http://hub.docker.com)). Docker Hub has over 100,000
images created by developers that you can run locally. You can search for Docker
Hub images and run them directly from Docker Desktop.
{{< include "guides-get-docker.md" >}}
## Step 1: Search for the image
You can search for Docker Hub images on Docker Desktop. To search for the image used in this walkthrough:
1. Open Docker Desktop and select the search.
2. Specify `docker/welcome-to-docker` in the search.
![Search Docker Desktop for the welcome-to-docker image](images/getting-started-search.webp?w=650&border=true)
## Step 2: Run the image
To run the `docker/welcome-to-docker` image:
1. After finding the image using search, select **Run**.
2. Expand the **Optional settings**.
3. In **Host port**, specify `8090`.
![Specifying host port 8090](images/getting-started-run.webp?w=500&border=true)
4. Select **Run**.
> **Note**
>
> Many images hosted on Docker Hub have a description that highlights what
> settings must be set in order to run them. You can read the description for
> the image on Docker Hub by selecting the image name in the search or by
> searching for the image directly on
> [https://hub.docker.com](https://hub.docker.com).
## Step 3: Explore the container
That's it! The container is ready to use. Go to the **Containers** tab in Docker Desktop to view the container.
![Viewing the Containers tab in Docker Desktop](images/getting-started-view.webp?border=true)
## Summary
In this walkthrough, you searched for an image on Docker Hub and ran it as a container. Docker Hub has over 100,000 more images that you can use to help build your own application.
Related information:
- Deep dive into the [Docker Hub manual](../../docker-hub/_index.md)
- Explore more images on [Docker Hub](https://hub.docker.com)
## Next steps
Continue to the next walkthrough to learn how you can use Docker to run
multi-container applications.
{{< button url="./multi-container-apps.md" text="Run multi-container apps" >}}

View File

@ -1,78 +0,0 @@
---
title: What is a container?
keywords: get started, quick start, intro, concepts
description: Learn what a container is by seeing and inspecting a running container.
aliases:
- /get-started/what-is-a-container/
---
A container is an isolated environment for your code. This means that a
container has no knowledge of your operating system, or your files. It runs on
the environment provided to you by Docker Desktop. Containers have everything
that your code needs in order to run, down to a base operating system. You can
use Docker Desktop to manage and explore your containers.
In this walkthrough, you'll view and explore an actual container in Docker
Desktop.
{{< include "guides-get-docker.md" >}}
## Step 1: Set up the walkthrough
The first thing you need is a running container. Use the following instructions to run a container.
1. Open Docker Desktop and select the search.
2. Specify `docker/welcome-to-docker` in the search and then select **Run**.
3. Expand the **Optional settings**.
4. In **Container name**, specify `welcome-to-docker`.
5. In **Host port**, specify `8088`.
![Specifying host port 8088](images/getting-started-setup.webp?w=500&border=true)
6. Select **Run**.
## Step 2: View containers on Docker Desktop
You just ran a container! You can view it in the **Containers** tab of Docker
Desktop. This container runs a simple web server that displays a simple website.
When working with more complex projects, you'll run different parts in different
containers. For example, a different container for the frontend, backend, and
database. In this walkthrough, you only have a simple frontend container.
## Step 3: View the frontend
The frontend is accessible on port 8088 of your local host. Select the link in
the **Port(s)** column of your container, or visit
[http://localhost:8088](http://localhost:8088) in your browser to view it.
![Accessing container frontend from Docker Desktop](images/getting-started-frontend.webp?border=true)
## Step 4: Explore your container
Docker Desktop lets you easily view and interact with different aspects of your
container. Try it out yourself. Select your container and then select **Files**
to explore your container's isolated file system.
![Viewing container details in Docker Desktop](images/getting-started-explore-container.webp?border=true)
## Step 5: Stop your container
The `welcome-to-docker` container continues to run until you stop it. To stop
the container in Docker Desktop, go to the **Containers** tab and select the
**Stop** icon in the **Actions** column of your container.
![Stopping a container in Docker Desktop](images/getting-started-stop.webp?border=true)
## Summary
In this walkthrough, you ran a pre-made image and explored a container. In addition to running pre-made images, you can build and run your own application as container.
Related information:
- Read more about containers in [Use containers to Build, Share and Run your applications](https://www.docker.com/resources/what-container/)
- Deep dive in Liz Rice's [Containers from Scratch](https://www.youtube.com/watch?v=8fi7uSYlOdc&t=1s) video presentation
## Next steps
Continue to the next walkthrough to learn what you need to create your own image
and run it as container.
{{< button url="./run-a-container.md" text="How do I run a container?" >}}

View File

@ -4,6 +4,8 @@ keywords: guides, docker, language, node, java, python, R, go, golang, .net
title: Language-specific guides overview
toc_min: 1
toc_max: 2
aliases:
- /guides/walkthroughs/containerize-your-app/
---
The language-specific guides walk you through the process of:

View File

@ -5,48 +5,26 @@ Guides:
path: /get-started/overview/
- sectiontitle: Get started
section:
- title: "Overview"
path: /guides/get-started/
- sectiontitle: "Quick hands-on guides"
section:
- title: "What is a container?"
path: /guides/walkthroughs/what-is-a-container/
- title: "Run a container"
path: /guides/walkthroughs/run-a-container/
- title: "Run Docker Hub images"
path: /guides/walkthroughs/run-hub-images/
- title: "Run multi-container applications"
path: /guides/walkthroughs/multi-container-apps/
- title: "Persist container data"
path: /guides/walkthroughs/persist-data/
- title: "Access a local folder"
path: /guides/walkthroughs/access-local-folder/
- title: "Containerize your application"
path: /guides/walkthroughs/containerize-your-app/
- title: "Publish your image"
path: /guides/walkthroughs/publish-your-image/
- sectiontitle: "Getting started guide"
section:
- title: "Part 1: Overview"
path: /get-started/
- title: "Part 2: Containerize an application"
path: /get-started/02_our_app/
- title: "Part 3: Update the application"
path: /get-started/03_updating_app/
- title: "Part 4: Share the application"
path: /get-started/04_sharing_app/
- title: "Part 5: Persist the DB"
path: /get-started/05_persisting_data/
- title: "Part 6: Use bind mounts"
path: /get-started/06_bind_mounts/
- title: "Part 7: Multi-container apps"
path: /get-started/07_multi_container/
- title: "Part 8: Use Docker Compose"
path: /get-started/08_using_compose/
- title: "Part 9: Image-building best practices"
path: /get-started/09_image_best/
- title: "Part 10: What next?"
path: /get-started/11_what_next/
- title: "Part 1: Overview"
path: /get-started/
- title: "Part 2: Containerize an application"
path: /get-started/02_our_app/
- title: "Part 3: Update the application"
path: /get-started/03_updating_app/
- title: "Part 4: Share the application"
path: /get-started/04_sharing_app/
- title: "Part 5: Persist the DB"
path: /get-started/05_persisting_data/
- title: "Part 6: Use bind mounts"
path: /get-started/06_bind_mounts/
- title: "Part 7: Multi-container apps"
path: /get-started/07_multi_container/
- title: "Part 8: Use Docker Compose"
path: /get-started/08_using_compose/
- title: "Part 9: Image-building best practices"
path: /get-started/09_image_best/
- title: "Part 10: What next?"
path: /get-started/11_what_next/
- sectiontitle: "Docker concepts"
section:

View File

@ -119,7 +119,7 @@
</p>
</div>
<div>
<a href="/guides/get-started/"
<a href="/get-started/"
class="flex cursor-pointer items-center gap-2 rounded bg-blue-light p-2 px-4 text-white transition duration-300 hover:bg-blue-light-400 dark:bg-blue-dark-400 dark:hover:bg-blue-dark">
Get started
</a>