mirror of https://github.com/docker/docs.git
remove hands-on guides (#17981)
* remove hands-on guides Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
This commit is contained in:
parent
5b42f55fb9
commit
558399fad0
|
@ -58,6 +58,10 @@ aliases:
|
|||
- /windows/step_six/
|
||||
- /windows/step_three/
|
||||
- /windows/step_two/
|
||||
- /get-started/what-is-a-container/
|
||||
- /get-started/run-your-own-container/
|
||||
- /get-started/run-docker-hub-images/
|
||||
- /get-started/publish-your-own-image/
|
||||
---
|
||||
|
||||
This guide contains step-by-step instructions on how to get started with Docker. This guide shows you how to:
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
title: Docker Desktop hands-on guides
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts
|
||||
description: Overview of Docker Desktop hands-on guides
|
||||
grid:
|
||||
- title: What is a container?
|
||||
icon: help
|
||||
link: /get-started/what-is-a-container/
|
||||
- title: How do I run a container?
|
||||
icon: edit_document
|
||||
link: /get-started/run-your-own-container/
|
||||
- title: Run Docker Hub images
|
||||
icon: layers
|
||||
link: /get-started/run-docker-hub-images/
|
||||
- title: Publish your images
|
||||
icon: publish
|
||||
link: /get-started/publish-your-own-image/
|
||||
---
|
||||
|
||||
Use the resources in this section to learn Docker concepts by using Docker Desktop.
|
||||
|
||||
{{< grid >}}
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
title: Publish your images
|
||||
keywords: get started, quick start, intro, concepts
|
||||
description: Learn how to publish your own images
|
||||
---
|
||||
|
||||
Follow this guide to learn how you can share your packaged application in an image using Docker Hub.
|
||||
|
||||
## Step 1: Get an image
|
||||
|
||||
Before you publish your image, you need an image to publish. For this guide, use the `welcome-to-docker` image.
|
||||
|
||||
To get the image, use Docker Desktop to search for the `welcome-to-docker` image, and then select **Pull**.
|
||||
|
||||

|
||||
|
||||
## Step 2: Sign in to Docker
|
||||
|
||||
To publish images publicly on Docker Hub, you first need an account. Select **Sign in** on the top-right of Docker Desktop to either sign in or create a new account on Docker Hub.
|
||||
|
||||

|
||||
|
||||
## Step 3: Rename your image
|
||||
|
||||
Before you can publish your image to Docker Hub, you need to rename it so that Docker Hub knows that the image is yours. Run the following `docker tag` command in your terminal to rename your image. Replace `YOUR-USERNAME` with your Docker ID.
|
||||
|
||||
```console
|
||||
$ docker tag docker/welcome-to-docker YOUR-USERNAME/welcome-to-docker
|
||||
```
|
||||
|
||||
## Step 4: Push your image to Docker Hub
|
||||
|
||||
In Docker Desktop, go to the **Images** tab and find your image. In the **Actions** column, select the **Show image actions** icon and then select **Push to Hub**. Your image uploads to Docker Hub and is publicly available for anyone to use.
|
||||
|
||||

|
||||
|
||||
## Step 5: Verify the image is on Docker Hub
|
||||
|
||||
That's it! Your image is now shared on Docker Hub. In your browser, go to [Docker Hub](https://hub.docker.com) and verify that you see the `welcome-to-docker` repository.
|
||||
|
||||
## What's next
|
||||
|
||||
In this guide you learned how to publish your own image to Docker Hub. Continue to the following language-specific guides to learn more about creating images for applications in other languages:
|
||||
|
||||
- [Node.js](../language/nodejs/index.md)
|
||||
- [Python](../language/python/index.md)
|
||||
- [Go](../language/golang/index.md)
|
||||
- [Java](../language/java/index.md)
|
||||
- [C# (.NET)](../language/dotnet/index.md)
|
|
@ -1,35 +0,0 @@
|
|||
---
|
||||
title: Run Docker Hub images
|
||||
keywords: get started, quick start, intro, concepts
|
||||
description: Learn how to 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.
|
||||
|
||||
## Step 1: Search for the image
|
||||
|
||||
You can search for Docker Hub images on Docker Desktop. Use the search bar, or use the shortcut ⌘K on Mac or Ctrl + K on Windows. In the search bar, specify `welcome-to-docker` to find the `docker/welcome-to-docker` image used in this guide.
|
||||
|
||||

|
||||
|
||||
## Step 2: Run the image
|
||||
|
||||
To run the `docker/welcome-to-docker` image, select **Run**. When the **Optional settings** appear, specify the **Host port** number `8090` and then 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 **View on Hub** 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.
|
||||
|
||||

|
||||
|
||||
## What's next
|
||||
|
||||
In this guide, you ran someone else's image from Docker Hub. Continue to the next guide to learn how you can publish your own image to Docker Hub.
|
||||
|
||||
{{< button text="Publish your images" url="./publish-your-own-image.md" >}}
|
|
@ -1,77 +0,0 @@
|
|||
---
|
||||
title: How do I run a container?
|
||||
keywords: get started, quick start, intro, concepts
|
||||
description: Learn how to run a container from scratch
|
||||
---
|
||||
|
||||
Follow this guide to learn the basic steps of running a container from scratch. This guide uses a sample Node.js application, but it's not necessary to know Node.js.
|
||||
|
||||
## 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" >}}
|
||||
|
||||
If you don't have Git, download the source and extract it.
|
||||
|
||||
{{< button text="Download the source" url="https://github.com/docker/welcome-to-docker/archive/refs/heads/main.zip" >}}
|
||||
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
## Step 2: Explore the Dockerfile
|
||||
|
||||
To run your code in a container, the most fundamental thing you need is a Dockerfile. A Dockerfile describes what goes into a container. Open the sample application in your IDE and then open the `Dockerfile` to explore its contents. Note that this project already has a Dockerfile, but for your own projects you need to create a Dockerfile. A Dockerfile is simply a text file named `Dockerfile` with no file extension.
|
||||
|
||||
## Step 3: Build your first image
|
||||
|
||||
An image is like a static version of a container. You always need an image to run a container. Once you have a Dockerfile in your repository, run the following `docker build` command in the project folder to create an image.
|
||||
|
||||
```console
|
||||
$ docker build -t welcome-to-docker .
|
||||
```
|
||||
|
||||
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, go to the **Images** tab, and then select **Run** in the **Actions** column of your image. When the **Optional settings** appear, specify the **Host port** number `8089` and then select **Run**.
|
||||
|
||||

|
||||
|
||||
## Step 5: Verify that your container is running
|
||||
|
||||
You can use Docker Desktop to view and access running containers. Go to the **Containers** tab to view your container and select the link in the **Port(s)** column or go to [http://localhost:8089](http://localhost:8089) to verify that the application is running.
|
||||
|
||||
## What's next
|
||||
|
||||
In this guide, you built your own image. When running containers on Docker Desktop, you don’t need to build your own image from scratch. You can also run images created by others on Docker Hub.
|
||||
|
||||
{{< button text="Run Docker Hub images" url="./run-docker-hub-images.md" >}}
|
||||
|
||||
## Dive deeper
|
||||
|
||||
### Language-specific guides
|
||||
|
||||
If you want to learn more about creating images for applications in other languages, check out the following language-specific guides:
|
||||
- [Node.js](../language/nodejs/index.md)
|
||||
- [Python](../language/python/index.md)
|
||||
- [Go](../language/golang/index.md)
|
||||
- [Java](../language/java/index.md)
|
||||
- [C# (.NET)](../language/dotnet/index.md)
|
||||
|
||||
### Breaking down the `docker build` command
|
||||
|
||||
When you built the image, you used the `docker build` command. Here are what the different parts of the `docker build` command do:
|
||||
- `docker build`: This command builds the image. It needs one argument, the source folder for the Dockerfile that needs to be built. In this case, it’s the Dockerfile in the current folder, `.`.
|
||||
- `-t welcome-to-docker`: The `-t` flag tags the image with a unique name. In this case, `welcome-to-docker`.
|
|
@ -1,60 +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.
|
||||
---
|
||||
|
||||
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. This is why a container usually has 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.
|
||||
|
||||
Continue with the following steps to view and explore an actual container in Docker Desktop.
|
||||
|
||||
## Step 1: Set up the guide
|
||||
|
||||
The first thing you need is a running container. For this guide, use the premade `welcome-to-docker` container. To get started, start Docker Desktop and then run the following command in your local terminal:
|
||||
|
||||
```console
|
||||
$ docker run -p 8088:80 -d --name welcome-to-docker docker/welcome-to-docker
|
||||
```
|
||||
|
||||
## Step 2: View containers on Docker Desktop
|
||||
|
||||
You just ran a container! Open Docker Desktop to take a look. This container runs a simple web server that displays HTML text. 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 guide, 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 check it out.
|
||||
|
||||

|
||||
|
||||
## Step 4: Explore your container
|
||||
|
||||
Docker Desktop allows you to 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.
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|
||||

|
||||
|
||||
## What's next
|
||||
|
||||
In this guide, you explored what a container is. Continue to the next guide to learn what you need to create and run your own container.
|
||||
|
||||
{{< button text="Run your own container" url="./run-your-own-container.md" >}}
|
||||
|
||||
## Dive deeper
|
||||
|
||||
### Breaking down the `docker run` command
|
||||
|
||||
When setting up the container, you used the `docker run` command. Here are what the different parts of the command do:
|
||||
|
||||
- `docker run`: This is used to run containers. It needs at least one argument, and that argument is the image you want to run. In this case, it's `docker/welcome-to-docker`.
|
||||
- `-p 8088:80`: This lets Docker know that port 80 in the container needs to be accessible from port 8088 on your local host.
|
||||
- `-d`: This runs the container detached or in the background.
|
||||
- `—-name welcome-to-docker`: This sets the name for your container. If you don’t do so, Docker selects a random name for you.
|
||||
|
||||
Continue following [What's next](#whats-next) to learn how to intuitively run an image using the Docker Desktop GUI.
|
|
@ -25,18 +25,6 @@ Guides:
|
|||
path: /get-started/09_image_best/
|
||||
- title: "Part 10: What next?"
|
||||
path: /get-started/11_what_next/
|
||||
- sectiontitle: Docker Desktop hands-on guides
|
||||
section:
|
||||
- path: /get-started/hands-on-overview/
|
||||
title: Overview
|
||||
- path: /get-started/what-is-a-container/
|
||||
title: What is a container?
|
||||
- path: /get-started/run-your-own-container/
|
||||
title: How do I run a container?
|
||||
- path: /get-started/run-docker-hub-images/
|
||||
title: Run Docker Hub images
|
||||
- path: /get-started/publish-your-own-image/
|
||||
title: Publish your images
|
||||
- sectiontitle: Language-specific guides
|
||||
section:
|
||||
- path: /language/
|
||||
|
|
Loading…
Reference in New Issue