get-started: update toc (#20200)
* Added a new concept pages 'Get Docker' * Changes in whats-next page * Formattinf changes * Removed an extra dot * Formatting changes * Few formatting changes * Added video for get started guides * Update content/guides/docker-concepts/getting-started/get-docker.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/get-docker.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/develop-with-containers.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/get-docker.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/develop-with-containers.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Removed a statement based on review * Added link to the zip file * few formatting changes * Added missing steps for VS Code * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * changed the title to Get Docker Desktop * Modified Additional setup instructions to Install Instructions * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * Update content/guides/docker-concepts/getting-started/whats-next.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * removed main.log * Update content/guides/docker-concepts/getting-started/build-and-push-first-image.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> * update get started toc Signed-off-by: Craig Osterhout <craig.osterhout@docker.com> * fix links Signed-off-by: Craig Osterhout <craig.osterhout@docker.com> --------- Signed-off-by: Craig Osterhout <craig.osterhout@docker.com> Co-authored-by: Ajeet Singh Raina <ajeetraina@gmail.com>
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
title: What next after getting started
|
||||
title: What next after the Docker workshop
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop
|
||||
description: Making sure you have more ideas of what you could do next with your application
|
||||
---
|
||||
|
||||
Although you're done with the get started guide, there's still a lot more to learn about containers.
|
||||
Although you're done with the workshop, there's still a lot more to learn about containers.
|
||||
|
||||
Here are a few other areas to look at next.
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
title: Overview of the get started guide
|
||||
title: Overview of the Docker workshop
|
||||
keywords: docker basics, how to start a docker container, container settings, setup
|
||||
docker, how to setup docker, setting up docker, docker container guide, how to get
|
||||
started with docker
|
||||
description: Get started with the Docker basics in this comprehensive overview, You'll
|
||||
description: Get started with the Docker basics in this workshop, You'll
|
||||
learn about containers, images, and how to containerize your first application.
|
||||
aliases:
|
||||
- /engine/getstarted-voting-app/
|
||||
|
@ -62,7 +62,7 @@ aliases:
|
|||
- /get-started/hands-on-overview/
|
||||
---
|
||||
|
||||
This guide contains step-by-step instructions on how to get started with Docker. This guide shows you how to:
|
||||
This 45-minute workshop contains step-by-step instructions on how to get started with Docker. This workshop shows you how to:
|
||||
|
||||
- Build and run an image as a container.
|
||||
- Share images using Docker Hub.
|
||||
|
|
|
@ -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: /get-started/
|
||||
link: /guides/getting-started/get-docker-desktop/
|
||||
icon: rocket
|
||||
- title: Docker concepts
|
||||
description: Gain a better understanding of foundational Docker concepts.
|
||||
|
@ -35,6 +35,10 @@ dive-deeper:
|
|||
description: Deploy and manage Docker containers at scale.
|
||||
link: /get-started/orchestration/
|
||||
icon: workspaces
|
||||
- title: Docker workshop
|
||||
description: Get guided through a 45-minute workshop to learn about Docker.
|
||||
link: /get-started/
|
||||
icon: desk
|
||||
|
||||
resources:
|
||||
- title: Educational resources
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
---
|
||||
title: Build and push your first image
|
||||
keywords: concepts, container, docker desktop
|
||||
description: This concept page will teach you how to build and push your first image
|
||||
---
|
||||
|
||||
{{< youtube-embed 7ge1s5nAa34 >}}
|
||||
|
||||
## Explanation
|
||||
|
||||
Now that you've updated the [to-do list app](develop-with-containers.md), you’re ready to create a container image for the application and share it on Docker Hub. To do so, you will need to do the following:
|
||||
|
||||
1. Sign in with your Docker account
|
||||
2. Create an image repository on Docker Hub
|
||||
3. Build the container image
|
||||
4. Push the image to Docker Hub
|
||||
|
||||
Before you dive into the hands-on guide, the following are a few core concepts that you should be aware of.
|
||||
|
||||
### Container images
|
||||
|
||||
If you’re new to container images, think of them as a standardized package that contains everything needed to run an application, including its files, configuration, and dependencies. These packages can then be distributed and shared with others.
|
||||
|
||||
### Docker Hub
|
||||
|
||||
To share your Docker images, you need a place to store them. This is where registries come in. While there are many registries, Docker Hub is the default and go-to registry for images. Docker Hub provides both a place for you to store your own images and to find images from others to either run or use as the bases for your own images.
|
||||
|
||||
In [Develop with containers](develop-with-containers.md), you used the following images that came from Docker Hub, each of which are [Docker Official Images](/trusted-content/official-images/):
|
||||
|
||||
- [node](https://hub.docker.com/_/node) - provides a Node environment and is used as the base of your development efforts. This image is also used as the base for the final application image.
|
||||
- [mysql](https://hub.docker.com/_/mysql) - provides a MySQL database to store the to-do list items
|
||||
- [phpmyadmin](https://hub.docker.com/_/phpmyadmin) - provides phpMyAdmin, a web-based interface to the MySQL database
|
||||
- [traefik](https://hub.docker.com/_/traefik) - provides Traefik, a modern HTTP reverse proxy and load balancer that routes requests to the appropriate container based on routing rules
|
||||
|
||||
Explore the full catalog of [Docker Official Images](https://hub.docker.com/search?image_filter=official&q=), [Docker Verified Publishers](https://hub.docker.com/search?q=&image_filter=store), and [Docker Sponsored Open Source Software](https://hub.docker.com/search?q=&image_filter=open_source) images to see more of what there is to run and build on.
|
||||
|
||||
## Try it out
|
||||
|
||||
In this hands-on guide, you'll learn how to sign in to Docker Hub and push images to Docker Hub repository.
|
||||
|
||||
## Sign in with your Docker account
|
||||
|
||||
To push images to Docker Hub, you will need to sign in with a Docker account.
|
||||
|
||||
1. Open the Docker Dashboard.
|
||||
|
||||
2. Select **Sign in** at the top-right corner.
|
||||
|
||||
3. If needed, create an account and then complete the sign-in flow.
|
||||
|
||||
Once you're done, you should see the **Sign in** button turn into a profile picture.
|
||||
|
||||
## Create an image repository
|
||||
|
||||
Now that you have an account, you can create an image repository. Just as a Git repository holds source code, an image repository stores container images.
|
||||
|
||||
1. Go to [Docker Hub](https://hub.docker.com).
|
||||
|
||||
2. Select **Create repository**.
|
||||
|
||||
3. On the **Create repository** page, enter the following information:
|
||||
|
||||
- **Repository name** - `getting-started-todo-app`
|
||||
- **Short description** - feel free to enter a description if you'd like
|
||||
- **Visibility** - select **Public** to allow others to pull your customized to-do app
|
||||
|
||||
4. Select **Create** to create the repository.
|
||||
|
||||
|
||||
## Build and push the image
|
||||
|
||||
Now that you have a repository, you are ready to build and push your image. An important note is that the image you are building extends the Node image, meaning you don't need to install or configure Node, yarn, etc. You can simply focus on what makes your application unique.
|
||||
|
||||
> **What is an image/Dockerfile?**
|
||||
>
|
||||
> Without going too deep yet, think of a container image as a single package that contains
|
||||
> everything needed to run a process. In this case, it will contain a Node environment,
|
||||
> the backend code, and the compiled React code.
|
||||
>
|
||||
> Any machine that runs a container using the image, will then be able to run the application as
|
||||
> it was built without needing anything else pre-installed on the machine.
|
||||
>
|
||||
> A `Dockerfile` is a text-based script that provides the instruction set on how to build
|
||||
> the image. For this quick start, the repository already contains the Dockerfile.
|
||||
|
||||
|
||||
{{< tabs group="cli-or-vs-code" persist=true >}}
|
||||
{{< tab name="CLI" >}}
|
||||
|
||||
1. To get started, either clone or [download the project as a ZIP file](https://github.com/docker/getting-started-todo-app/archive/refs/heads/main.zip) to your local machine.
|
||||
|
||||
```console
|
||||
$ git clone https://github.com/docker/getting-started-todo-app
|
||||
```
|
||||
|
||||
And after the project is cloned, navigate into the new directory created by the clone:
|
||||
|
||||
```console
|
||||
$ cd getting-started-todo-app
|
||||
```
|
||||
|
||||
2. Build the project by running the following command, swapping out `DOCKER_USERNAME` with your username.
|
||||
|
||||
```console
|
||||
$ docker build -t <DOCKER_USERNAME>/getting-started-todo-app .
|
||||
```
|
||||
|
||||
For example, if your Docker username was `mobydock`, you would run the following:
|
||||
|
||||
```console
|
||||
$ docker build -t mobydock/getting-started-todo-app .
|
||||
```
|
||||
|
||||
3. To verify the image exists locally, you can use the `docker image ls` command:
|
||||
|
||||
```console
|
||||
$ docker image ls
|
||||
```
|
||||
|
||||
You will see output similar to the following:
|
||||
|
||||
```console
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
mobydock/getting-started-todo-app latest 1543656c9290 2 minutes ago 1.12GB
|
||||
...
|
||||
```
|
||||
|
||||
4. To push the image, use the `docker push` command. Be sure to replace `DOCKER_USERNAME` with your username:
|
||||
|
||||
```console
|
||||
$ docker push <DOCKER_USERNAME>/getting-started-todo-app
|
||||
```
|
||||
|
||||
Depending on your upload speeds, this may take a moment to push.
|
||||
|
||||
{{< /tab >}}
|
||||
{{< tab name="VS Code" >}}
|
||||
|
||||
1. Open Visual Studio Code. In the **File** menu, select **Open Folder**. Choose **Clone Git Repository** and paste this URL: [https://github.com/docker/getting-started-todo-app](https://github.com/docker/getting-started-todo-app)
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
2. Right-click the `Dockerfile` and select the **Build Image...** menu item.
|
||||
|
||||
|
||||

|
||||
|
||||
3. In the dialog that appears, enter a name of `DOCKER_USERNAME/getting-started-todo-app`, replacing `DOCKER_USERNAME` with your Docker username.
|
||||
|
||||
4. After pressing **Enter**, you'll see a terminal appear where the build will occur. Once it's completed, feel free to close the terminal.
|
||||
|
||||
5. Open the Docker Extension for VS Code by selecting the Docker logo in the left nav menu.
|
||||
|
||||
6. Find the image you created. It'll have a name of `docker.io/DOCKER_USERNAME/getting-started-todo-app`.
|
||||
|
||||
7. Expand the image to view the tags (or different versions) of the image. You should see a tag named `latest`, which is the default tag given to an image.
|
||||
|
||||
8. Right-click on the **latest** item and select the **Push...** option.
|
||||
|
||||

|
||||
|
||||
9. Press **Enter** to confirm and then watch as your image is pushed to Docker Hub. Depending on your upload speeds, it might take a moment to push the image.
|
||||
|
||||
Once the upload is finished, feel free to close the terminal.
|
||||
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
|
||||
## Recap
|
||||
|
||||
Before you move on, take a moment and reflect on what happened here. Within a few moments, you were able to build a container image that packages your application and push it to Docker Hub.
|
||||
|
||||
Going forward, you’ll want to remember that:
|
||||
|
||||
- Docker Hub is the go-to registry for finding trusted content. Docker provides a collection of trusted content, composed of Docker Official Images, Docker Verified Publishers, and Docker Sponsored Open Source Software, to use directly or as bases for your own images.
|
||||
|
||||
- Docker Hub provides a marketplace to distribute your own applications. Anyone can create an account and distribute images. While you are publicly distributing the image you created, private repositories can ensure your images are accessible to only authorized users.
|
||||
|
||||
> **Usage of other registries**
|
||||
>
|
||||
> While Docker Hub is the default registry, registries are standardized and made
|
||||
> interoperable through the [Open Container Initiative](https://opencontainers.org/). This allows companies and
|
||||
> organizations to run their own private registries. Quite often, trusted content
|
||||
> is mirrored (or copied) from Docker Hub into these private registries.
|
||||
>
|
||||
|
||||
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you’ve built an image, it's time to discuss why you as a developer should learn more about Docker and how it will help you in your day-to-day tasks.
|
||||
|
||||
{{< button text="What's Next" url="whats-next" >}}
|
||||
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
---
|
||||
title: Develop with containers
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: This concept page will teach you how to develop with containers
|
||||
---
|
||||
|
||||
{{< youtube-embed D0SDBrS3t9I >}}
|
||||
|
||||
## Explanation
|
||||
|
||||
Now that you have Docker Desktop installed, you’re are ready to do some application development. Specifically, you will do the following:
|
||||
|
||||
1. Clone and start a development project
|
||||
2. Make changes to the backend and frontend
|
||||
3. See the changes immediately
|
||||
|
||||
## Try it out
|
||||
|
||||
In this hands-on guide, you'll learn how to develop with containers.
|
||||
|
||||
|
||||
## Start the project
|
||||
|
||||
1. To get started, either clone or [download the project as a ZIP file](https://github.com/docker/getting-started-todo-app/archive/refs/heads/main.zip) to your local machine.
|
||||
|
||||
```console
|
||||
$ git clone https://github.com/docker/getting-started-todo-app
|
||||
```
|
||||
|
||||
And after the project is cloned, navigate into the new directory created by the clone:
|
||||
|
||||
```console
|
||||
$ cd getting-started-todo-app
|
||||
```
|
||||
|
||||
2. Once you have the project, start the development environment using Docker Compose.
|
||||
|
||||
|
||||
To start the project using the CLI, run the following command:
|
||||
|
||||
```console
|
||||
$ docker compose watch
|
||||
```
|
||||
|
||||
You will see an output that shows container images being pulled down, containers starting, and more. Don't worry if you don't understand it all at this point. But, within a moment or two, things should stabilize and finish.
|
||||
|
||||
|
||||
3. Open your browser to [http://localhost](http://localhost) to see the application up and running. It may take a few minutes for the app to run. The app is a simple to-do application, so feel free to add an item or two, mark some as done, or even delete an item.
|
||||
|
||||

|
||||
|
||||
|
||||
### What's in the environment?
|
||||
|
||||
Now that the environment is up and running, what's actually in it? At a high-level, there are several containers (or processes) that each serve a specific need for the application:
|
||||
|
||||
- React frontend - a Node container that's running the React dev server, using [Vite](https://vitejs.dev/).
|
||||
- Node backend - the backend provides an API that provides the ability to retrieve, create, and delete to-do items.
|
||||
- MySQL database - a database to store the list of the items.
|
||||
- phpMyAdmin - a web-based interface to interact with the database that is accessible at [http://db.localhost](http://db.localhost).
|
||||
- Traefik proxy - [Traefik](https://traefik.io/traefik/) is an application proxy that routes requests to the right service. It sends all requests for `localhost/api/*` to the backend, requests for `localhost/*` to the frontend, and then requests for `db.localhost` to phpMyAdmin. This provides the ability to access all applications using port 80 (instead of different ports for each service).
|
||||
|
||||
With this environment, you as the developer don’t need to install or configure any services, populate a database schema, configure database credentials, or anything. You only need Docker Desktop. The rest just works.
|
||||
|
||||
|
||||
## Make changes to the app
|
||||
|
||||
With this environment up and running, you’re ready to make a few changes to the application and see how Docker helps provide a fast feedback loop.
|
||||
|
||||
### Change the greeting
|
||||
|
||||
The greeting at the top of the page is populated by an API call at `/api/greeting`. Currently, it always returns "Hello world!". You’ll now modify it to return one of three randomized messages (that you'll get to choose).
|
||||
|
||||
1. Open the `backend/src/routes/getGreeting.js` file. This file provides the handler for the API endpoint.
|
||||
|
||||
2. Modify the variable at the top to an array of greetings. Feel free to use the following modifications or customize it to your own liking.
|
||||
|
||||
```js {linenos=table,hl_lines=["1-5"],linenostart=1}
|
||||
const GREETINGS = [
|
||||
"Whalecome!",
|
||||
"All hands on deck!",
|
||||
"Charting the course ahead!",
|
||||
];
|
||||
|
||||
module.exports = async (req, res) => {
|
||||
...
|
||||
```
|
||||
|
||||
3. Now, update the endpoint to send a random greeting from this list by making the following change:
|
||||
|
||||
```js {linenos=table,hl_lines=[3],linenostart=7}
|
||||
module.exports = async (req, res) => {
|
||||
res.send({
|
||||
greeting: GREETINGS[ Math.floor( Math.random() * GREETINGS.length )],
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
4. If you haven't done so yet, save the file. If you refresh your browser, you should see a new greeting. If you keep refreshing, you should see all of the messages appear.
|
||||
|
||||

|
||||
|
||||
|
||||
### Change the placeholder text
|
||||
|
||||
When you look at the app, you'll see the placeholder text is simply "New Item". You’ll now make that a little more descriptive and fun. You’ll also make a few changes to the styling of the app too.
|
||||
|
||||
1. Open the `client/src/components/AddNewItemForm.jsx` file. This provides the component to add a new item to the to-do list.
|
||||
|
||||
2. Modify the `placeholder` attribute of the `Form.Control` element to whatever you'd like to display.
|
||||
|
||||
```js {linenos=table,hl_lines=[5],linenostart=33}
|
||||
<Form.Control
|
||||
value={newItem}
|
||||
onChange={(e) => setNewItem(e.target.value)}
|
||||
type="text"
|
||||
placeholder="What do you need to do?"
|
||||
aria-label="New item"
|
||||
/>
|
||||
```
|
||||
|
||||
3. Save the file and go back to your browser. You should see the change already hot-reloaded into your browser. If you don't like it, feel free to tweak it until it looks just right.
|
||||
|
||||

|
||||
|
||||
|
||||
### Change the background color
|
||||
|
||||
Before you consider the application finalized, you need to make the colors better.
|
||||
|
||||
1. Open the `client/src/index.scss` file.
|
||||
|
||||
2. Adjust the `background-color` attribute to any color you'd like. The provided snippet is a soft blue to go along with Docker's nautical theme.
|
||||
|
||||
If you're using an IDE, you can pick a color using the integrated color pickers. Otherwise, feel free to use an online [Color Picker](https://www.w3schools.com/colors/colors_picker.asp).
|
||||
|
||||
```css {linenos=table,hl_lines=2,linenostart=3}
|
||||
body {
|
||||
background-color: #99bbff;
|
||||
margin-top: 50px;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
```
|
||||
|
||||
Each save should let you see the change immediately in the browser. Keep adjusting it until it's the perfect setup for you.
|
||||
|
||||
|
||||

|
||||
|
||||
And with that, you're done. Congrats on updating your website.
|
||||
|
||||
|
||||
## Recap
|
||||
|
||||
Before you move on, take a moment and reflect on what happened here. Within a few moments, you were able to:
|
||||
|
||||
- Start a complete development project with zero installation effort. The containerized environment provided the development environment, ensuring you have everything you need. You didn't have to install Node, MySQL, or any of the other dependencies directly on your machine. All you needed was Docker Desktop and a code editor.
|
||||
|
||||
- Make changes and see them immediately. This was made possible because 1) the processes running in each container are watching and responding to file changes and 2) the files are shared with the containerized environment.
|
||||
|
||||
Docker Desktop enables all of this and so much more. Once you start thinking with containers, you can create almost any environment and easily share it with your team.
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that the application has been updated, you’re ready to learn about packaging it as a container image and pushing it to a registry, specifically Docker Hub.
|
||||
|
||||
{{< button text="Build and push your first image" url="build-and-push-first-image" >}}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
title: Get Docker Desktop
|
||||
keywords: concepts, container, docker desktop
|
||||
description: This concept page will teach you download Docker Desktop and install it on Windows, Mac, and Linux
|
||||
---
|
||||
|
||||
{{< youtube-embed C2bPVhiNU-0 >}}
|
||||
|
||||
## Explanation
|
||||
|
||||
Docker Desktop is the all-in-one package to build images, run containers, and so much more.
|
||||
This guide will walk you through the installation process, enabling you to experience Docker Desktop firsthand.
|
||||
|
||||
|
||||
> **Docker Desktop terms**
|
||||
>
|
||||
> Commercial use of Docker Desktop in larger enterprises (more than 250
|
||||
> employees OR more than $10 million USD in annual revenue) requires a [paid subscription](https://www.docker.com/pricing/?_gl=1*1nyypal*_ga*MTYxMTUxMzkzOS4xNjgzNTM0MTcw*_ga_XJWPQMJYHQ*MTcxNjk4MzU4Mi4xMjE2LjEuMTcxNjk4MzkzNS4xNy4wLjA.).
|
||||
|
||||
{{< card
|
||||
title="Docker Desktop for Mac"
|
||||
description="[Download (Apple Silicon)](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-arm64) | [Download (Intel)](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64) | [Install instructions](/desktop/install/mac-install)"
|
||||
icon="/assets/images/apple_48.svg" >}}
|
||||
|
||||
<br>
|
||||
|
||||
{{< card
|
||||
title="Docker Desktop for Windows"
|
||||
description="[Download](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-windows) | [Install instructions](/desktop/install/windows-install)"
|
||||
icon="/assets/images/windows_48.svg" >}}
|
||||
|
||||
<br>
|
||||
|
||||
{{< card
|
||||
title="Docker Desktop for Linux"
|
||||
description="[Install instructions](/desktop/install/linux-install/)"
|
||||
icon="/assets/images/linux_48.svg" >}}
|
||||
|
||||
Once it's installed, complete the setup process and you're all set to run a Docker container.
|
||||
|
||||
## Try it out
|
||||
|
||||
In this hands-on guide, you will see how to run a Docker container using Docker Desktop.
|
||||
|
||||
Follow the instructions to run a container using the CLI.
|
||||
|
||||
|
||||
## Run your first container
|
||||
|
||||
Open your CLI terminal and start a container by running the `docker run` command:
|
||||
|
||||
|
||||
|
||||
```console
|
||||
$ docker run -d -p 8080:80 docker/welcome-to-docker
|
||||
```
|
||||
|
||||
## Access the frontend
|
||||
|
||||
For this container, the frontend is accessible on port `8080`. To open the website, visit [http://localhost:8080](http://localhost:8080) in your browser.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
## Manage containers using Docker Desktop
|
||||
|
||||
|
||||
1. Open Docker Desktop and select the **Container** field on the left sidebar.
|
||||
2. You can view information about your container including logs, and files, and even access the shell by selecting the **Exec** tab.
|
||||
|
||||

|
||||
|
||||
|
||||
3. Select the **Inspect** field to obtain detailed information about the container. You can perform various actions such as pause, resume, start or stop containers, or explore the **Logs**, **Bind mounts**, **Exec**, **Files**, and **Stats** tabs.
|
||||
|
||||

|
||||
|
||||
Docker Desktop simplifies container management for developers by streamlining the setup, configuration, and compatibility of applications across different environments, thereby addressing the pain points of environment inconsistencies and deployment challenges.
|
||||
|
||||
## What's next?
|
||||
|
||||
Now that you have Docker Desktop installed and ran your first container, it's time to start developing with containers.
|
||||
|
||||
{{< button text="Develop with containers" url="develop-with-containers" >}}
|
||||
|
After Width: | Height: | Size: 181 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 95 KiB |
|
@ -0,0 +1,74 @@
|
|||
---
|
||||
title: What's next
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: Explore step-by-step guides to hep you understand core Docker concepts, building images, and running containers.
|
||||
notoc: true
|
||||
|
||||
the-basics:
|
||||
- title: What is a container?
|
||||
description: Learn how to run your first container.
|
||||
link: /guides/docker-concepts/the-basics/what-is-a-container/
|
||||
- title: What is an image?
|
||||
description: Learn the basics of image layers.
|
||||
link: /guides/docker-concepts/the-basics/what-is-an-image/
|
||||
- title: What is a registry?
|
||||
description: Learn about container registries, explore their interoperability, and interact with registries.
|
||||
link: /guides/docker-concepts/the-basics/what-is-a-registry/
|
||||
- title: What is Docker Compose?
|
||||
description: Gain a better understanding of Docker Compose.
|
||||
link: /guides/docker-concepts/the-basics/what-is-docker-compose/
|
||||
|
||||
building-images:
|
||||
- title: Understanding image layers
|
||||
description: Learn about the layers of container images.
|
||||
link: /guides/docker-concepts/building-images/understanding-image-layers/
|
||||
- title: Writing a Dockerfile
|
||||
description: Learn how to create an image using a Dockerfile.
|
||||
link: /guides/docker-concepts/building-images/writing-a-dockerfile/
|
||||
- title: Build, tag and publish an image
|
||||
description: Learn how to build, tag, and publish an image to Docker Hub or any other registry.
|
||||
link: /guides/docker-concepts/building-images/build-tag-and-publish-an-image/
|
||||
- title: Using the build cache
|
||||
description: Learn about the build cache, what changes invalidate the cache, and how to effectively use the build cache.
|
||||
link: /guides/docker-concepts/building-images/using-the-build-cache/
|
||||
- title: Multi-stage builds
|
||||
description: Get a better understanding of multi-stage builds and their benefits.
|
||||
link: /guides/docker-concepts/building-images/multi-stage-builds/
|
||||
|
||||
running-containers:
|
||||
- title: Publishing ports
|
||||
description: Understand the significance of publishing and exposing ports in Docker.
|
||||
link: /guides/docker-concepts/running-containers/publishing-ports/
|
||||
- title: Overriding container defaults
|
||||
description: Learn how to override the container defaults using the `docker run` command.
|
||||
link: /guides/docker-concepts/running-containers/overriding-container-defaults/
|
||||
- title: Persisting container data
|
||||
description: Learn the significance of data persistence in Docker.
|
||||
link: /guides/docker-concepts/running-containers/persisting-container-data/
|
||||
- title: Sharing local files with containers
|
||||
description: Explore the various storage options available in Docker and their common usage.
|
||||
link: /guides/docker-concepts/running-containers/sharing-local-files/
|
||||
- title: Multi-container applications
|
||||
description: Learn the significance of multi-container applications and how they're different from single-container applications.
|
||||
link: /guides/docker-concepts/running-containers/multi-container-applications/
|
||||
---
|
||||
|
||||
The following sections provide step-by-step guides to help you understand core Docker concepts, building images, and running containers.
|
||||
|
||||
## The basics
|
||||
|
||||
Get started learning the core concepts of containers, images, registries, and Docker Compose.
|
||||
|
||||
{{< grid items="the-basics" >}}
|
||||
|
||||
## Building images
|
||||
|
||||
Craft optimized container images with Dockerfiles, build cache, and multi-stage builds.
|
||||
|
||||
{{< grid items="building-images" >}}
|
||||
|
||||
## Running containers
|
||||
|
||||
Master essential techniques for exposing ports, overriding defaults, persisting data, sharing files, and managing multi-container applications.
|
||||
|
||||
{{< grid items="running-containers" >}}
|
|
@ -3,28 +3,18 @@ Guides:
|
|||
path: /guides/
|
||||
- title: Docker overview
|
||||
path: /get-started/overview/
|
||||
- sectiontitle: Get started
|
||||
|
||||
- sectiontitle: "Getting started"
|
||||
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: "Get Docker Desktop"
|
||||
path: /guides/getting-started/get-docker-desktop/
|
||||
- title: "Develop with containers"
|
||||
path: /guides/getting-started/develop-with-containers/
|
||||
- title: "Build and push your first image"
|
||||
path: /guides/getting-started/build-and-push-first-image/
|
||||
- title: "What's next"
|
||||
path: /guides/getting-started/whats-next/
|
||||
|
||||
|
||||
- sectiontitle: "Docker concepts"
|
||||
section:
|
||||
|
@ -261,6 +251,31 @@ Guides:
|
|||
path: /get-started/swarm-deploy/
|
||||
- title: Cloud integrations
|
||||
path: /cloud/
|
||||
|
||||
- sectiontitle: Docker workshop
|
||||
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/
|
||||
|
||||
|
||||
- path: /get-started/resources/
|
||||
title: "Educational resources"
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/get-started/"
|
||||
<a href="/guides/getting-started/get-docker-desktop/"
|
||||
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>
|
||||
|
|