Merge pull request #20761 from dvdksn/manuals-section
hugo: move content files, use filesystem-based navigation
|
@ -24,9 +24,12 @@ The website is built using [Hugo](https://gohugo.io/). The content is primarily
|
|||
Markdown files in the `/content` directory of this repository (with a few
|
||||
exceptions, see [Content not edited here](#content-not-edited-here)).
|
||||
|
||||
The structure of the sidebar navigation on the site is defined in
|
||||
[`/data/toc.yaml`](./data/toc.yaml). To rename or change the location of a page
|
||||
in the left-hand navigation, edit the `toc.yaml` file.
|
||||
The structure of the sidebar navigation on the site is defined by the site's
|
||||
section hierarchy in the `contents` directory. The titles of the pages are
|
||||
defined in the front matter of the Markdown files. You can use `title` and
|
||||
`linkTitle` to define the title of the page. `title` is used for the page
|
||||
title, and `linkTitle` is used for the sidebar title. If `linkTitle` is not
|
||||
defined, the `title` is used for both.
|
||||
|
||||
You must fork this repository to create a pull request to propose changes. For more details, see [Local setup](#local-setup).
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ USER root
|
|||
RUN --mount=type=bind,target=. \
|
||||
/usr/local/bin/markdownlint-cli2 \
|
||||
"content/**/*.md" \
|
||||
"#content/engine/release-notes/*.md" \
|
||||
"#content/desktop/previous-versions/*.md"
|
||||
"#content/manuals/engine/release-notes/*.md" \
|
||||
"#content/manuals/desktop/previous-versions/*.md"
|
||||
|
||||
# test validates HTML output and checks for broken links
|
||||
FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS test
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
title: Deprecated Docker Engine features
|
||||
linkTitle: Deprecated features
|
||||
aliases: ["/engine/misc/deprecated/"]
|
||||
description: "Deprecated Features."
|
||||
keywords: "docker, documentation, about, technology, deprecate"
|
||||
|
@ -13,8 +15,6 @@ keywords: "docker, documentation, about, technology, deprecate"
|
|||
will be rejected.
|
||||
-->
|
||||
|
||||
# Deprecated Engine Features
|
||||
|
||||
This page provides an overview of features that are deprecated in Engine. Changes
|
||||
in packaging, and supported (Linux) distributions are not included. To learn
|
||||
about end of support for Linux distributions, refer to the
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Docker Engine managed plugin system
|
||||
linkTitle: Docker Engine plugins
|
||||
description: Develop and use a plugin with the managed plugin system
|
||||
keywords: "API, Usage, plugins, documentation, developer"
|
||||
aliases:
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# buildkitd.toml
|
||||
---
|
||||
title: buildkitd.toml
|
||||
---
|
||||
|
||||
The TOML file used to configure the buildkitd daemon settings has a short
|
||||
list of global settings followed by a series of sections for specific areas
|
||||
|
|
|
@ -31,14 +31,6 @@
|
|||
@apply dark:hue-rotate-180 dark:invert dark:filter;
|
||||
}
|
||||
|
||||
.sidebar-hover {
|
||||
@apply hover:bg-gray-light-200 hover:dark:bg-gray-dark-200;
|
||||
}
|
||||
|
||||
.sidebar-underline {
|
||||
@apply underline decoration-blue-light decoration-4 underline-offset-4 dark:decoration-blue-dark;
|
||||
}
|
||||
|
||||
.bg-pattern-blue {
|
||||
background-color: theme(colors.white / 50%);
|
||||
background-image: url('/assets/images/bg-pattern-blue.webp');
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
function toggleMenuItem(event) {
|
||||
const section = event.currentTarget.parentElement;
|
||||
const icons = event.currentTarget.querySelectorAll(".icon-svg");
|
||||
const subsection = section.querySelector("ul");
|
||||
subsection.classList.toggle("hidden");
|
||||
icons.forEach(i => i.classList.toggle('hidden'))
|
||||
}
|
||||
|
||||
const sectiontree = document.querySelector("#sectiontree");
|
||||
if (sectiontree) {
|
||||
for (const button of sectiontree.querySelectorAll("button")) {
|
||||
button.addEventListener("click", toggleMenuItem);
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
description: Explains how to work with containers
|
||||
keywords: docker, introduction, documentation, about, technology, docker.io, user,
|
||||
guide, user's, manual, platform, framework, home, intro
|
||||
title: Engine tutorials
|
||||
aliases:
|
||||
- /engine/userguide/containers/
|
||||
---
|
||||
|
||||
Learn by example:
|
||||
|
||||
* [Network containers](networkingcontainers.md)
|
||||
* [Manage data in containers](/engine/storage/volumes.md)
|
||||
* [Samples](../../samples/index.md)
|
||||
* [Get Started](/get-started/introduction/_index.md)
|
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 40 KiB |
|
@ -1,214 +0,0 @@
|
|||
---
|
||||
description: How to network Docker containers.
|
||||
keywords: Examples, Usage, volume, docker, documentation, user guide, data, volumes
|
||||
title: Network containers
|
||||
aliases:
|
||||
- /engine/userguide/containers/networkigncontainers/
|
||||
- /engine/userguide/networkigncontainers/
|
||||
---
|
||||
|
||||
If you are working your way through the user guide, you just built and ran a
|
||||
simple application. You've also built in your own images. This section teaches
|
||||
you how to network your containers.
|
||||
|
||||
## Launch a container on the default network
|
||||
|
||||
Docker includes support for networking containers through the use of **network
|
||||
drivers**. By default, Docker provides two network drivers for you, the
|
||||
`bridge` and the `overlay` drivers. You can also write a network driver plugin so
|
||||
that you can create your own drivers but that is an advanced task.
|
||||
|
||||
Every installation of the Docker Engine automatically includes three default networks. You can list them:
|
||||
|
||||
$ docker network ls
|
||||
|
||||
NETWORK ID NAME DRIVER
|
||||
18a2866682b8 none null
|
||||
c288470c46f6 host host
|
||||
7b369448dccb bridge bridge
|
||||
|
||||
The network named `bridge` is a special network. Unless you tell it otherwise, Docker always launches your containers in this network. Try this now:
|
||||
|
||||
$ docker run -itd --name=networktest ubuntu
|
||||
|
||||
74695c9cea6d9810718fddadc01a727a5dd3ce6a69d09752239736c030599741
|
||||
|
||||

|
||||
|
||||
Inspecting the network is an easy way to find out the container's IP address.
|
||||
|
||||
```console
|
||||
$ docker network inspect bridge
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "bridge",
|
||||
"Id": "f7ab26d71dbd6f557852c7156ae0574bbf62c42f539b50c8ebde0f728a253b6f",
|
||||
"Scope": "local",
|
||||
"Driver": "bridge",
|
||||
"EnableIPv6": false,
|
||||
"IPAM": {
|
||||
"Driver": "default",
|
||||
"Options": null,
|
||||
"Config": [
|
||||
{
|
||||
"Subnet": "172.17.0.1/16",
|
||||
"Gateway": "172.17.0.1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Internal": false,
|
||||
"Containers": {
|
||||
"3386a527aa08b37ea9232cbcace2d2458d49f44bb05a6b775fba7ddd40d8f92c": {
|
||||
"Name": "networktest",
|
||||
"EndpointID": "647c12443e91faf0fd508b6edfe59c30b642abb60dfab890b4bdccee38750bc1",
|
||||
"MacAddress": "02:42:ac:11:00:02",
|
||||
"IPv4Address": "172.17.0.2/16",
|
||||
"IPv6Address": ""
|
||||
}
|
||||
},
|
||||
"Options": {
|
||||
"com.docker.network.bridge.default_bridge": "true",
|
||||
"com.docker.network.bridge.enable_icc": "true",
|
||||
"com.docker.network.bridge.enable_ip_masquerade": "true",
|
||||
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
|
||||
"com.docker.network.bridge.name": "docker0",
|
||||
"com.docker.network.driver.mtu": "9001"
|
||||
},
|
||||
"Labels": {}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
You can remove a container from a network by disconnecting the container. To do this, you supply both the network name and the container name. You can also use the container ID. In this example, though, the name is faster.
|
||||
|
||||
$ docker network disconnect bridge networktest
|
||||
|
||||
While you can disconnect a container from a network, you cannot remove the
|
||||
builtin `bridge` network named `bridge`. Networks are natural ways to isolate
|
||||
containers from other containers or other networks. So, as you get more
|
||||
experienced with Docker, create your own networks.
|
||||
|
||||
## Create your own bridge network
|
||||
|
||||
Docker Engine natively supports both bridge networks and overlay networks. A bridge network is limited to a single host running Docker Engine. An overlay network can include multiple hosts and is a more advanced topic. For this example, create a bridge network:
|
||||
|
||||
$ docker network create -d bridge my_bridge
|
||||
|
||||
The `-d` flag tells Docker to use the `bridge` driver for the new network. You could have left this flag off as `bridge` is the default value for this flag. Go ahead and list the networks on your machine:
|
||||
|
||||
$ docker network ls
|
||||
|
||||
NETWORK ID NAME DRIVER
|
||||
7b369448dccb bridge bridge
|
||||
615d565d498c my_bridge bridge
|
||||
18a2866682b8 none null
|
||||
c288470c46f6 host host
|
||||
|
||||
If you inspect the network, it has nothing in it.
|
||||
|
||||
$ docker network inspect my_bridge
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "my_bridge",
|
||||
"Id": "5a8afc6364bccb199540e133e63adb76a557906dd9ff82b94183fc48c40857ac",
|
||||
"Scope": "local",
|
||||
"Driver": "bridge",
|
||||
"IPAM": {
|
||||
"Driver": "default",
|
||||
"Config": [
|
||||
{
|
||||
"Subnet": "10.0.0.0/24",
|
||||
"Gateway": "10.0.0.1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Containers": {},
|
||||
"Options": {},
|
||||
"Labels": {}
|
||||
}
|
||||
]
|
||||
|
||||
## Add containers to a network
|
||||
|
||||
To build web applications that act in concert but do so securely, create a
|
||||
network. Networks, by definition, provide complete isolation for containers. You
|
||||
can add containers to a network when you first run a container.
|
||||
|
||||
Launch a container running a PostgreSQL database and pass it the `--net=my_bridge` flag to connect it to your new network:
|
||||
|
||||
$ docker run -d --net=my_bridge --name db training/postgres
|
||||
|
||||
If you inspect your `my_bridge` you can see it has a container attached.
|
||||
You can also inspect your container to see where it is connected:
|
||||
|
||||
|
||||
$ docker inspect --format='{{json .NetworkSettings.Networks}}' db
|
||||
|
||||
|
||||
{"my_bridge":{"NetworkID":"7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99",
|
||||
"EndpointID":"508b170d56b2ac9e4ef86694b0a76a22dd3df1983404f7321da5649645bf7043","Gateway":"10.0.0.1","IPAddress":"10.0.0.254","IPPrefixLen":24,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}
|
||||
|
||||
Now, go ahead and start your by now familiar web application. This time don't specify a network.
|
||||
|
||||
$ docker run -d --name web training/webapp python app.py
|
||||
|
||||

|
||||
|
||||
Which network is your `web` application running under? Inspect the application to verify that it is running in the default `bridge` network.
|
||||
|
||||
|
||||
$ docker inspect --format='{{json .NetworkSettings.Networks}}' web
|
||||
|
||||
|
||||
{"bridge":{"NetworkID":"7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812",
|
||||
"EndpointID":"508b170d56b2ac9e4ef86694b0a76a22dd3df1983404f7321da5649645bf7043","Gateway":"172.17.0.1","IPAddress":"10.0.0.2","IPPrefixLen":24,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02"}}
|
||||
|
||||
Then, get the IP address of your `web`
|
||||
|
||||
|
||||
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' web
|
||||
|
||||
|
||||
172.17.0.2
|
||||
|
||||
Now, open a shell to your running `db` container:
|
||||
|
||||
$ docker container exec -it db bash
|
||||
|
||||
root@a205f0dd33b2:/# ping 172.17.0.2
|
||||
ping 172.17.0.2
|
||||
PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
|
||||
^C
|
||||
--- 172.17.0.2 ping statistics ---
|
||||
44 packets transmitted, 0 received, 100% packet loss, time 43185ms
|
||||
|
||||
After a bit, use `CTRL-C` to end the `ping` and notice that the ping failed. That is because the two containers are running on different networks. You can fix that. Then, use the `exit` command to close the container.
|
||||
|
||||
Docker networking allows you to attach a container to as many networks as you like. You can also attach an already running container. Go ahead and attach your running `web` app to the `my_bridge`.
|
||||
|
||||
$ docker network connect my_bridge web
|
||||
|
||||
|
||||

|
||||
|
||||
Open a shell into the `db` application again and try the ping command. This time just use the container name `web` rather than the IP address.
|
||||
|
||||
$ docker container exec -it db bash
|
||||
|
||||
root@a205f0dd33b2:/# ping web
|
||||
PING web (10.0.0.2) 56(84) bytes of data.
|
||||
64 bytes from web (10.0.0.2): icmp_seq=1 ttl=64 time=0.095 ms
|
||||
64 bytes from web (10.0.0.2): icmp_seq=2 ttl=64 time=0.060 ms
|
||||
64 bytes from web (10.0.0.2): icmp_seq=3 ttl=64 time=0.066 ms
|
||||
^C
|
||||
--- web ping statistics ---
|
||||
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
|
||||
rtt min/avg/max/mdev = 0.060/0.073/0.095/0.018 ms
|
||||
|
||||
The `ping` shows it is contacting a different IP address, the address on the `my_bridge` which is different from its address on the `bridge` network.
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you know how to network containers, see [how to manage data in containers](/engine/storage/volumes.md).
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
build:
|
||||
render: never
|
||||
title: Docker concepts
|
||||
weight: 40
|
||||
---
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Building images
|
||||
weight: 20
|
||||
keywords: build images, Dockerfile, layers, tag, push, cache, multi-stage
|
||||
description: |
|
||||
Learn how to build Docker images from a Dockerfile. You'll understand the
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
build:
|
||||
render: never
|
||||
title: Running containers
|
||||
weight: 30
|
||||
---
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Multi-container applications
|
||||
weight: 5
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: This concept page will teach you the significance of multi-container application and how it is different from single-container application
|
||||
aliases:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Overriding container defaults
|
||||
weight: 2
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: This concept page will teach you how to override the container defaults using the `docker run` command.
|
||||
aliases:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Persisting container data
|
||||
weight: 3
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: This concept page will teach you the significance of data persistence in Docker
|
||||
aliases:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: Publishing and exposing ports
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: This concept page will teach you the significance of publishing and exposing ports in Docker
|
||||
weight: 1
|
||||
aliases:
|
||||
- /guides/docker-concepts/running-containers/publishing-ports/
|
||||
---
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Sharing local files with containers
|
||||
weight: 4
|
||||
keywords: concepts, images, container, docker desktop
|
||||
description: This concept page will teach you the various storage options available in Docker and their common usage.
|
||||
aliases:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
build:
|
||||
render: never
|
||||
title: The basics
|
||||
weight: 10
|
||||
---
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: What is a container?
|
||||
weight: 10
|
||||
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:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: What is a registry?
|
||||
weight: 30
|
||||
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:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: What is an image?
|
||||
weight: 20
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: What is an image
|
||||
aliases:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: What is Docker Compose?
|
||||
weight: 40
|
||||
keywords: concepts, build, images, container, docker desktop
|
||||
description: What is Docker Compose?
|
||||
aliases:
|
||||
|
|
|
@ -5,6 +5,7 @@ keywords: what is a docker, docker daemon, why use docker, docker architecture,
|
|||
to use docker for, docker client, what is docker for, why docker, uses for docker,
|
||||
what is docker container used for, what are docker containers used for
|
||||
title: What is Docker?
|
||||
weight: 20
|
||||
aliases:
|
||||
- /introduction/understanding-docker/
|
||||
- /engine/userguide/basics/
|
||||
|
@ -106,7 +107,7 @@ Docker API. The Docker client can communicate with more than one daemon.
|
|||
|
||||
### Docker Desktop
|
||||
|
||||
Docker Desktop is an easy-to-install application for your Mac, Windows or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (`dockerd`), the Docker client (`docker`), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see [Docker Desktop](/desktop/index.md).
|
||||
Docker Desktop is an easy-to-install application for your Mac, Windows or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (`dockerd`), the Docker client (`docker`), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see [Docker Desktop](/manuals/desktop/index.md).
|
||||
|
||||
### Docker registries
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ description: Download and install Docker on the platform of your choice, includi
|
|||
keywords: install docker, docker download, download docker, docker installation, how
|
||||
to install docker, get docker, docker locally
|
||||
title: Get Docker
|
||||
weight: 10
|
||||
aliases:
|
||||
- /install/
|
||||
- /install/overview/
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Introduction
|
||||
keywords: get started, getting started, how to get started
|
||||
weight: 30
|
||||
description: |
|
||||
Get started with Docker. You'll learn about Docker Desktop, developing with
|
||||
Docker, as well as how to build and push your first image.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Containerize an application
|
||||
weight: 20
|
||||
linkTitle: "Part 1: Containerize an application"
|
||||
keywords: dockerfile example, Containerize an application, run docker file, running
|
||||
docker file, how to run dockerfile, example dockerfile, how to create a docker container,
|
||||
create dockerfile, simple dockerfile, creating containers
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Update the application
|
||||
weight: 30
|
||||
linkTitle: "Part 2: Update the application"
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop
|
||||
description: Making changes to your application
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Share the application
|
||||
weight: 40
|
||||
linkTitle: "Part 3: Share the application"
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop, docker hub, sharing
|
||||
description: Sharing your image you built for your example application so you can
|
||||
|
@ -80,7 +82,7 @@ new instance that has never seen this container image. To do this, you will use
|
|||
> $ docker build --platform linux/amd64 -t YOUR-USER-NAME/getting-started .
|
||||
> ```
|
||||
>
|
||||
> Docker buildx also supports building multi-platform images. To learn more, see [Multi-platform images](/build/building/multi-platform.md).
|
||||
> Docker buildx also supports building multi-platform images. To learn more, see [Multi-platform images](/manuals/build/building/multi-platform.md).
|
||||
|
||||
|
||||
1. Open your browser to [Play with Docker](https://labs.play-with-docker.com/).
|
||||
|
@ -112,7 +114,7 @@ new instance that has never seen this container image. To do this, you will use
|
|||
> on all interfaces of the host, making it available to the outside world.
|
||||
>
|
||||
> For more information about how port mapping works, see
|
||||
> [Networking](/engine/network/_index.md#published-ports).
|
||||
> [Networking](/manuals/engine/network/_index.md#published-ports).
|
||||
|
||||
6. Select the 3000 badge when it appears.
|
||||
|
||||
|
@ -129,8 +131,8 @@ can use the latest version of the image.
|
|||
Related information:
|
||||
|
||||
- [docker CLI reference](/reference/cli/docker/)
|
||||
- [Multi-platform images](/build/building/multi-platform.md)
|
||||
- [Docker Hub overview](/docker-hub/_index.md)
|
||||
- [Multi-platform images](/manuals/build/building/multi-platform.md)
|
||||
- [Docker Hub overview](/manuals/docker-hub/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Persist the DB
|
||||
weight: 50
|
||||
linkTitle: "Part 4: Persist the DB"
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop
|
||||
description: Making your DB persistent in your application
|
||||
|
@ -63,7 +65,7 @@ With the previous experiment, you saw that each container starts from the image
|
|||
While containers can create, update, and delete files, those changes are lost when you remove the container
|
||||
and Docker isolates all changes to that container. With volumes, you can change all of this.
|
||||
|
||||
[Volumes](/engine/storage/volumes.md) provide the ability to connect specific filesystem paths of
|
||||
[Volumes](/manuals/engine/storage/volumes.md) provide the ability to connect specific filesystem paths of
|
||||
the container back to the host machine. If you mount a directory in the container, changes in that
|
||||
directory are also seen on the host machine. If you mount that same directory across container restarts, you'd see
|
||||
the same files.
|
||||
|
@ -118,7 +120,7 @@ You can create the volume and start the container using the CLI or Docker Deskto
|
|||
> ```
|
||||
>
|
||||
> For more details about Git Bash's syntax differences, see
|
||||
> [Working with Git Bash](../../desktop/troubleshoot/topics/#working-with-git-bash).
|
||||
> [Working with Git Bash](/desktop/troubleshoot/topics/#working-with-git-bash).
|
||||
|
||||
|
||||
{{< /tab >}}
|
||||
|
@ -205,7 +207,7 @@ In this section, you learned how to persist container data.
|
|||
Related information:
|
||||
|
||||
- [docker CLI reference](/reference/cli/docker/)
|
||||
- [Volumes](/engine/storage/volumes.md)
|
||||
- [Volumes](/manuals/engine/storage/volumes.md)
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Use bind mounts
|
||||
weight: 60
|
||||
linkTitle: "Part 5: Use bind mounts"
|
||||
keywords: 'get started, setup, orientation, quickstart, intro, concepts, containers, docker desktop'
|
||||
description: Using bind mounts in our application
|
||||
aliases:
|
||||
|
@ -49,9 +51,9 @@ work.
|
|||
1. Verify that your `getting-started-app` directory is in a directory defined in
|
||||
Docker Desktop's file sharing setting. This setting defines which parts of your
|
||||
filesystem you can share with containers. For details about accessing the
|
||||
setting, see the topic for [Mac](/desktop/settings/mac.md#file-sharing),
|
||||
[Windows](/desktop/settings/windows.md#file-sharing), or
|
||||
[Linux](/desktop/settings/linux.md#file-sharing).
|
||||
setting, see the topic for [Mac](/manuals/desktop/settings/mac.md#file-sharing),
|
||||
[Windows](/manuals/desktop/settings/windows.md#file-sharing), or
|
||||
[Linux](/manuals/desktop/settings/linux.md#file-sharing).
|
||||
|
||||
2. Open a terminal and change directory to the `getting-started-app`
|
||||
directory.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Multi container apps
|
||||
weight: 70
|
||||
linkTitle: "Part 6: Multi-container apps"
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop
|
||||
description: Using more than one container in your application
|
||||
|
@ -313,7 +315,7 @@ container. You learned a little bit about container networking and service disco
|
|||
|
||||
Related information:
|
||||
- [docker CLI reference](/reference/cli/docker/)
|
||||
- [Networking overview](/engine/network/_index.md)
|
||||
- [Networking overview](/manuals/engine/network/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Use Docker Compose
|
||||
weight: 80
|
||||
linkTitle: "Part 7: Use Docker Compose"
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop
|
||||
description: Using Docker Compose for multi-container applications
|
||||
|
@ -8,7 +10,7 @@ aliases:
|
|||
- /guides/workshop/08_using_compose/
|
||||
---
|
||||
|
||||
[Docker Compose](/compose/_index.md) is a tool that helps you define and
|
||||
[Docker Compose](/manuals/compose/_index.md) is a tool that helps you define and
|
||||
share multi-container applications. With Compose, you can create a YAML file to define the services
|
||||
and with a single command, you can spin everything up or tear it all down.
|
||||
|
||||
|
@ -279,7 +281,7 @@ In this section, you learned about Docker Compose and how it helps you simplify
|
|||
the way you define and share multi-service applications.
|
||||
|
||||
Related information:
|
||||
- [Compose overview](/compose/_index.md)
|
||||
- [Compose overview](/manuals/compose/_index.md)
|
||||
- [Compose file reference](/reference/compose-file/_index.md)
|
||||
- [Compose CLI reference](/reference/cli/docker/compose/_index.md)
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: Image-building best practices
|
||||
weight: 90
|
||||
linkTitle: "Part 8: Image-building best practices"
|
||||
keywords: get started, setup, orientation, quickstart, intro, concepts, containers,
|
||||
docker desktop
|
||||
description: Tips for building images for your application
|
||||
|
@ -201,7 +203,7 @@ In this section, you learned a few image building best practices, including laye
|
|||
|
||||
Related information:
|
||||
- [Dockerfile reference](/reference/dockerfile/)
|
||||
- [Dockerfile best practices](/build/building/best-practices.md)
|
||||
- [Dockerfile best practices](/manuals/build/building/best-practices.md)
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: What next after the Docker workshop
|
||||
weight: 100
|
||||
linkTitle: "Part 9: What next"
|
||||
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
|
||||
|
@ -52,4 +54,4 @@ If you'd like to see how containers are built from scratch, Liz Rice from Aqua S
|
|||
|
||||
## Language-specific guides
|
||||
|
||||
If you are looking for information on how to containerize an application using your favorite language, see the [Language-specific guides](/language/_index.md).
|
||||
If you are looking for information on how to containerize an application using your favorite language, see the [Language-specific guides](/guides/language/_index.md).
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Overview of the Docker workshop
|
||||
linkTitle: 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
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Deployment and orchestration
|
||||
weight: 30
|
||||
build:
|
||||
render: never
|
||||
---
|
||||
|
|
@ -103,8 +103,8 @@ In addition to deploying to Swarm, you've also described your application as a s
|
|||
|
||||
Further documentation for all new Swarm objects and CLI commands used in this article are available here:
|
||||
|
||||
- [Swarm Mode](/engine/swarm/_index.md)
|
||||
- [Swarm Mode Services](/engine/swarm/how-swarm-mode-works/services.md)
|
||||
- [Swarm Stacks](/engine/swarm/stack-deploy.md)
|
||||
- [Swarm Mode](/manuals/engine/swarm/_index.md)
|
||||
- [Swarm Mode Services](/manuals/engine/swarm/how-swarm-mode-works/services.md)
|
||||
- [Swarm Stacks](/manuals/engine/swarm/stack-deploy.md)
|
||||
- [`docker stack *`](/reference/cli/docker/stack/)
|
||||
- [`docker service *`](/reference/cli/docker/service/)
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
description: Language-specific guides overview
|
||||
linkTitle: Language-specific guides
|
||||
weight: 10
|
||||
keywords: guides, docker, language, node, java, python, R, go, golang, .net, c++
|
||||
title: Language-specific guides overview
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /guides/walkthroughs/containerize-your-app/
|
||||
- /language/
|
||||
---
|
||||
|
||||
The language-specific guides walk you through the process of:
|
||||
* Containerizing language-specific applications
|
||||
* Setting up a development environment
|
||||
* Configuring a CI/CD pipeline
|
||||
* Deploying an application locally using Kubernetes
|
||||
|
||||
In addition to the language-specific modules, Docker documentation also provides guidelines to build images and efficiently manage your development environment. For more information, refer to the following topics:
|
||||
|
||||
* [Building best practices](/manuals/build/building/best-practices.md)
|
||||
* [Build images with BuildKit](/manuals/build/buildkit/index.md#getting-started)
|
||||
|
||||
## Language-specific guides
|
||||
|
||||
Learn how to containerize your applications and start developing using Docker. Choose one of the following languages to get started.
|
||||
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 h-auto gap-4">
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/nodejs/"><img class="m-auto rounded" src="/guides/language/images/nodejs.webp" alt="Develop with Node"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/python/"><img class="m-auto rounded" src="/guides/language/images/python.webp" alt="Develop with Python"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/r/"><img class="m-auto rounded" src="/guides/language/images/r.webp" alt="Develop with R"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/java/"><img class="m-auto rounded" src="/guides/language/images/java.webp" alt="Develop with Java"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/golang/"><img class="m-auto rounded" src="/guides/language/images/golang.webp" alt="Develop with Go"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/dotnet/"><img class="m-auto rounded" src="/guides/language/images/c-sharp.webp" alt="Develop with C#"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/cpp/"><img class="m-auto rounded" src="/guides/language/images/cpp.webp" alt="Develop with C++"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/rust/"><img class="m-auto rounded" src="/guides/language/images/rust-logo.webp" alt="Develop with Rust"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/php/"><img class="m-auto rounded" src="/guides/language/images/php-logo.webp" alt="Develop with PHP"></a>
|
||||
</div>
|
||||
<div class="flex items-center flex-1 shadow p-4">
|
||||
<a href="/guides/language/ruby/"><img class="m-auto rounded" src="/guides/language/images/ruby-on-rails.webp" alt="Develop with Ruby"></a>
|
||||
</div>
|
||||
</div>
|
|
@ -2,8 +2,11 @@
|
|||
description: Containerize and develop C++ applications using Docker.
|
||||
keywords: getting started, c++
|
||||
title: C++ language-specific guide
|
||||
linkTitle: C++
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/cpp/
|
||||
---
|
||||
|
||||
The C++ getting started guide teaches you how to create a containerized C++ application using Docker. In this guide, you'll learn how to:
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your C++ application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: ci/cd, github actions, c++, shiny
|
||||
description: Learn how to configure CI/CD using GitHub Actions for your C++ application.
|
||||
aliases:
|
||||
- /language/cpp/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -119,7 +123,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your C++ application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Containerize a C++ application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: C++, containerize, initialize
|
||||
description: Learn how to containerize a C++ application.
|
||||
aliases:
|
||||
- /language/cpp/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -34,8 +38,8 @@ directory.
|
|||
```
|
||||
|
||||
To learn more about the files in the repository, see the following:
|
||||
- [Dockerfile](../../reference/dockerfile.md)
|
||||
- [.dockerignore](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Dockerfile](/reference/dockerfile.md)
|
||||
- [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||
- [compose.yml](/reference/compose-file/_index.md)
|
||||
|
||||
## Run the application
|
||||
|
@ -79,7 +83,7 @@ In this section, you learned how you can containerize and run your C++
|
|||
application using Docker.
|
||||
|
||||
Related information:
|
||||
- [Docker Compose overview](../../compose/_index.md)
|
||||
- [Docker Compose overview](/manuals/compose/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your C++ deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, kubernetes, c++
|
||||
description: Learn how to develop locally using Kubernetes
|
||||
aliases:
|
||||
- /language/cpp/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -133,5 +137,5 @@ In this section, you learned how to use Docker Desktop to deploy your C++ applic
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Use containers for C++ development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: C++, local, development
|
||||
description: Learn how to develop your C++ application locally.
|
||||
aliases:
|
||||
- /language/cpp/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -26,7 +30,7 @@ $ git clone https://github.com/Pradumnasaraf/c-plus-plus-docker.git
|
|||
|
||||
Use Compose Watch to automatically update your running Compose services as you
|
||||
edit and save your code. For more details about Compose Watch, see [Use Compose
|
||||
Watch](../../compose/file-watch.md).
|
||||
Watch](/manuals/compose/file-watch.md).
|
||||
|
||||
Open your `compose.yml` file in an IDE or text editor and then add the Compose Watch instructions. The following example shows how to add Compose Watch to your `compose.yml` file.
|
||||
|
||||
|
@ -63,8 +67,8 @@ In this section, you also learned how to use Compose Watch to automatically rebu
|
|||
|
||||
Related information:
|
||||
- [Compose file reference](/reference/compose-file/)
|
||||
- [Compose file watch](../../compose/file-watch.md)
|
||||
- [Multi-stage builds](../../build/building/multi-stage.md)
|
||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: .NET language-specific guide
|
||||
linkTitle: C# (.NET)
|
||||
description: Containerize and develop .NET apps using Docker
|
||||
keywords: getting started, .net
|
||||
title: .NET language-specific guide
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/dotnet/
|
||||
---
|
||||
|
||||
The .NET getting started guide teaches you how to create a containerized .NET application using Docker. In this guide, you'll learn how to:
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your .NET application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: .net, CI/CD
|
||||
description: Learn how to Configure CI/CD for your .NET application
|
||||
aliases:
|
||||
- /language/dotnet/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -134,7 +138,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: Containerize a .NET application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: .net, containerize, initialize
|
||||
description: Learn how to containerize an ASP.NET application.
|
||||
aliases:
|
||||
- /language/dotnet/build-images/
|
||||
- /language/dotnet/run-containers/
|
||||
- /language/dotnet/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -75,8 +78,8 @@ directory.
|
|||
```
|
||||
|
||||
To learn more about the files that `docker init` added, see the following:
|
||||
- [Dockerfile](../../reference/dockerfile.md)
|
||||
- [.dockerignore](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Dockerfile](/reference/dockerfile.md)
|
||||
- [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||
- [compose.yaml](/reference/compose-file/_index.md)
|
||||
|
||||
## Run the application
|
||||
|
@ -119,9 +122,9 @@ In this section, you learned how you can containerize and run your .NET
|
|||
application using Docker.
|
||||
|
||||
Related information:
|
||||
- [Dockerfile reference](../../reference/dockerfile.md)
|
||||
- [.dockerignore file reference](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Docker Compose overview](../../compose/_index.md)
|
||||
- [Dockerfile reference](/reference/dockerfile.md)
|
||||
- [.dockerignore file reference](/reference/dockerfile.md#dockerignore-file)
|
||||
- [Docker Compose overview](/manuals/compose/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your .NET deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, .net, local, development
|
||||
description: Learn how to deploy your application
|
||||
aliases:
|
||||
- /language/dotnet/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -209,5 +213,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Use containers for .NET development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: .net, development
|
||||
description: Learn how to develop your .NET application locally using containers.
|
||||
aliases:
|
||||
- /language/dotnet/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -225,7 +229,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
|||
|
||||
## Automatically update services
|
||||
|
||||
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](../../compose/file-watch.md).
|
||||
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/file-watch.md).
|
||||
|
||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
|
||||
|
||||
|
@ -292,7 +296,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
|||
|
||||
## Create a development container
|
||||
|
||||
At this point, when you run your containerized application, it's using the .NET runtime image. While this small image is good for production, it lacks the SDK tools and dependencies you may need when developing. Also, during development, you may not need to run `dotnet publish`. You can use multi-stage builds to build stages for both development and production in the same Dockerfile. For more details, see [Multi-stage builds](../../build/building/multi-stage.md).
|
||||
At this point, when you run your containerized application, it's using the .NET runtime image. While this small image is good for production, it lacks the SDK tools and dependencies you may need when developing. Also, during development, you may not need to run `dotnet publish`. You can use multi-stage builds to build stages for both development and production in the same Dockerfile. For more details, see [Multi-stage builds](/manuals/build/building/multi-stage.md).
|
||||
|
||||
Add a new development stage to your Dockerfile and update your `compose.yaml` file to use this stage for local development.
|
||||
|
||||
|
@ -383,8 +387,8 @@ database and persist data. You also learned how to use Compose Watch to automati
|
|||
|
||||
Related information:
|
||||
- [Compose file reference](/reference/compose-file/)
|
||||
- [Compose file watch](../../compose/file-watch.md)
|
||||
- [Multi-stage builds](../../build/building/multi-stage.md)
|
||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Run .NET tests in a container
|
||||
linkTitle: Run your tests
|
||||
weight: 30
|
||||
keywords: .NET, test
|
||||
description: Learn how to run your .NET tests in a container.
|
||||
aliases:
|
||||
- /language/dotnet/run-tests/
|
||||
---
|
||||
|
||||
## Prerequisites
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Go language-specific guide
|
||||
linkTitle: Go
|
||||
description: Containerize Go apps using Docker
|
||||
keywords: docker, getting started, go, golang, language, dockerfile
|
||||
title: Go language-specific guide
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/golang/
|
||||
---
|
||||
|
||||
This guide will show you how to create, test, and deploy containerized Go applications using Docker.
|
||||
|
@ -30,11 +33,11 @@ the [Go website](https://golang.org/) is a great place to explore,
|
|||
so *go* (pun intended) check it out!
|
||||
|
||||
You also must know some basic [Docker concepts](/get-started/docker-concepts/the-basics/what-is-a-container.md) as well as to
|
||||
be at least vaguely familiar with the [Dockerfile format](../../build/concepts/dockerfile.md).
|
||||
be at least vaguely familiar with the [Dockerfile format](/manuals/build/concepts/dockerfile.md).
|
||||
|
||||
Your Docker set-up must have BuildKit enabled. BuildKit is enabled by default for all users on [Docker Desktop](../../desktop/index.md).
|
||||
Your Docker set-up must have BuildKit enabled. BuildKit is enabled by default for all users on [Docker Desktop](/manuals/desktop/index.md).
|
||||
If you have installed Docker Desktop, you don’t have to manually enable BuildKit. If you are running Docker on Linux,
|
||||
please check out BuildKit [getting started](../../build/buildkit/index.md#getting-started) page.
|
||||
please check out BuildKit [getting started](/manuals/build/buildkit/index.md#getting-started) page.
|
||||
|
||||
Some familiarity with the command line is also expected.
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Build your Go image
|
||||
linkTitle: Build images
|
||||
weight: 5
|
||||
keywords: containers, images, go, golang, dockerfiles, coding, build, push, run
|
||||
description: Learn how to build your first Docker image by writing a Dockerfile
|
||||
aliases:
|
||||
- /get-started/golang/build-images/
|
||||
- /language/golang/build-images/
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
@ -17,7 +20,7 @@ application.
|
|||
|
||||
To complete this tutorial, you need the following:
|
||||
|
||||
- Docker running locally. Follow the [instructions to download and install Docker](../../desktop/index.md).
|
||||
- Docker running locally. Follow the [instructions to download and install Docker](/manuals/desktop/index.md).
|
||||
- An IDE or a text editor to edit files. [Visual Studio Code](https://code.visualstudio.com/) is a free and popular choice but you can use anything you feel comfortable with.
|
||||
- A Git client. This guide uses a command-line based `git` client, but you are free to use whatever works for you.
|
||||
- A command-line terminal application. The examples shown in this module are from the Linux shell, but they should work in PowerShell, Windows Command Prompt, or OS X Terminal with minimal, if any, modifications.
|
||||
|
@ -113,7 +116,7 @@ has all necessary tools and libraries to compile and run a Go application.
|
|||
|
||||
> [!NOTE]
|
||||
>
|
||||
> If you are curious about creating your own base images, you can check out the following section of this guide: [creating base images](../../build/building/base-images.md#create-a-base-image).
|
||||
> If you are curious about creating your own base images, you can check out the following section of this guide: [creating base images](/manuals/build/building/base-images.md#create-a-base-image).
|
||||
> Note, however, that this isn't necessary to continue with your task at hand.
|
||||
|
||||
Now that you have defined the base image for your upcoming container image, you
|
||||
|
@ -155,7 +158,7 @@ COPY go.mod go.sum ./
|
|||
>
|
||||
> If you'd like to familiarize yourself with the trailing slash treatment by the
|
||||
> `COPY` command, see [Dockerfile
|
||||
> reference](../../reference/dockerfile.md#copy). This trailing slash can
|
||||
> reference](/reference/dockerfile.md#copy). This trailing slash can
|
||||
> cause issues in more ways than you can imagine.
|
||||
|
||||
Now that you have the module files inside the Docker image that you are
|
||||
|
@ -307,7 +310,7 @@ successfully built your image named `docker-gs-ping`.
|
|||
|
||||
To see the list of images you have on your local machine, you have two options.
|
||||
One is to use the CLI and the other is to use [Docker
|
||||
Desktop](../../desktop/index.md). Since you're currently working in the
|
||||
Desktop](/manuals/desktop/index.md). Since you're currently working in the
|
||||
terminal, take a look at listing images with the CLI.
|
||||
|
||||
To list images, run the `docker image ls`command (or the `docker images` shorthand):
|
||||
|
@ -407,7 +410,7 @@ The answer is that the full toolchain is still there, in the container image.
|
|||
Not only this is inconvenient because of the large file size, but it may also
|
||||
present a security risk when the container is deployed.
|
||||
|
||||
These two issues can be solved by using [multi-stage builds](../../build/building/multi-stage.md).
|
||||
These two issues can be solved by using [multi-stage builds](/manuals/build/building/multi-stage.md).
|
||||
|
||||
In a nutshell, a multi-stage build can carry over the artifacts from one build stage into another,
|
||||
and every build stage can be instantiated from a different base image.
|
||||
|
@ -478,7 +481,7 @@ This is so because the ["distroless"](https://github.com/GoogleContainerTools/di
|
|||
base image that you have used in the second stage of the build is very barebones and is designed for lean deployments of static binaries.
|
||||
|
||||
There's much more to multi-stage builds, including the possibility of multi-architecture builds,
|
||||
so feel free to check out [multi-stage builds](../../build/building/multi-stage.md). This is, however, not essential for your progress here.
|
||||
so feel free to check out [multi-stage builds](/manuals/build/building/multi-stage.md). This is, however, not essential for your progress here.
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your Go application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: go, CI/CD, local, development
|
||||
description: Learn how to Configure CI/CD for your Go application
|
||||
aliases:
|
||||
- /language/golang/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -119,7 +123,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your Go deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, go, local, development
|
||||
description: Learn how to deploy your Go application
|
||||
aliases:
|
||||
- /language/golang/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -234,5 +238,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Use containers for Go development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: get started, go, golang, local, development
|
||||
description: Learn how to develop your application locally.
|
||||
aliases:
|
||||
- /get-started/golang/develop/
|
||||
- /language/golang/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -26,7 +29,7 @@ For more information on the relation between Go and CockroachDB, refer to the [C
|
|||
|
||||
### Storage
|
||||
|
||||
The point of a database is to have a persistent store of data. [Volumes](/engine/storage/volumes.md) are the preferred mechanism for persisting data generated by and used by Docker containers. Thus, before you start CockroachDB, create the volume for it.
|
||||
The point of a database is to have a persistent store of data. [Volumes](/manuals/engine/storage/volumes.md) are the preferred mechanism for persisting data generated by and used by Docker containers. Thus, before you start CockroachDB, create the volume for it.
|
||||
|
||||
To create a managed volume, run :
|
||||
|
||||
|
@ -65,7 +68,7 @@ daed20bbecce host host local
|
|||
6aee44f40a39 none null local
|
||||
```
|
||||
|
||||
Your bridge network `mynet` has been created successfully. The other three networks, named `bridge`, `host`, and `none` are the default networks and they had been created by the Docker itself. While it's not relevant to this guide, you can learn more about Docker networking in the [networking overview](/engine/network/_index.md) section.
|
||||
Your bridge network `mynet` has been created successfully. The other three networks, named `bridge`, `host`, and `none` are the default networks and they had been created by the Docker itself. While it's not relevant to this guide, you can learn more about Docker networking in the [networking overview](/manuals/engine/network/_index.md) section.
|
||||
|
||||
### Choose good names for volumes and networks
|
||||
|
||||
|
@ -568,7 +571,7 @@ networks:
|
|||
```
|
||||
|
||||
|
||||
This Docker Compose configuration is super convenient as you don't have to type all the parameters to pass to the `docker run` command. You can declaratively do that in the Docker Compose file. The [Docker Compose documentation pages](../../compose/index.md) are quite extensive and include a full reference for the Docker Compose file format.
|
||||
This Docker Compose configuration is super convenient as you don't have to type all the parameters to pass to the `docker run` command. You can declaratively do that in the Docker Compose file. The [Docker Compose documentation pages](/manuals/compose/index.md) are quite extensive and include a full reference for the Docker Compose file format.
|
||||
|
||||
### The `.env` file
|
||||
|
||||
|
@ -711,7 +714,7 @@ There are some tangential, yet interesting points that were purposefully not cov
|
|||
|
||||
### Persistent storage
|
||||
|
||||
A managed volume isn't the only way to provide your container with persistent storage. It is highly recommended to get acquainted with available storage options and their use cases, covered in [Manage data in Docker](/engine/storage/_index.md).
|
||||
A managed volume isn't the only way to provide your container with persistent storage. It is highly recommended to get acquainted with available storage options and their use cases, covered in [Manage data in Docker](/manuals/engine/storage/_index.md).
|
||||
|
||||
### CockroachDB clusters
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Run your Go image as a container
|
||||
linkTitle: Run containers
|
||||
weight: 10
|
||||
keywords: get started, go, golang, run, container
|
||||
description: Learn how to run the image as a container.
|
||||
aliases:
|
||||
- /get-started/golang/run-containers/
|
||||
- /language/golang/run-containers/
|
||||
---
|
||||
|
||||
## Prerequisites
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Run your tests using Go test
|
||||
linkTitle: Run your tests
|
||||
weight: 30
|
||||
keywords: build, go, golang, test
|
||||
description: How to build and run your Go tests in a container
|
||||
aliases:
|
||||
- /get-started/golang/run-tests/
|
||||
- /language/golang/run-tests/
|
||||
---
|
||||
|
||||
## Prerequisites
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Java language-specific guide
|
||||
linkTitle: Java
|
||||
keywords: java, getting started
|
||||
description: Containerize Java apps using Docker
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/java/
|
||||
---
|
||||
|
||||
The Java getting started guide teaches you how to create a containerized Spring Boot application using Docker. In this module, you’ll learn how to:
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your Java application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: java, CI/CD, local, development
|
||||
description: Learn how to Configure CI/CD for your Java application
|
||||
aliases:
|
||||
- /language/java/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -129,7 +133,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: Containerize a Java application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: java, containerize, initialize, maven, build
|
||||
description: Learn how to containerize a Java application.
|
||||
aliases:
|
||||
- /language/java/build-images/
|
||||
- /language/java/run-containers/
|
||||
- /language/java/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your Java deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, kubernetes, java
|
||||
description: Learn how to develop locally using Kubernetes
|
||||
aliases:
|
||||
- /language/java/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -144,5 +148,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Use containers for Java development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: Java, local, development, run,
|
||||
description: Learn how to develop your application locally.
|
||||
aliases:
|
||||
- /language/java/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -261,7 +265,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
|||
|
||||
Use Compose Watch to automatically update your running Compose services as you
|
||||
edit and save your code. For more details about Compose Watch, see
|
||||
[Use Compose Watch](../../compose/file-watch.md).
|
||||
[Use Compose Watch](/manuals/compose/file-watch.md).
|
||||
|
||||
Open your `docker-compose.yaml` file in an IDE or text editor and then add the
|
||||
Compose Watch instructions. The following is the updated `docker-compose.yaml`
|
||||
|
@ -336,7 +340,7 @@ In this section, you took a look at running a database locally and persisting th
|
|||
Related information:
|
||||
|
||||
- [Compose file reference](/reference/compose-file/)
|
||||
- [Compose Watch](../../compose/file-watch.md)
|
||||
- [Compose Watch](/manuals/compose/file-watch.md)
|
||||
- [Dockerfile reference](/reference/dockerfile/)
|
||||
|
||||
## Next steps
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Run your Java tests
|
||||
linkTitle: Run your tests
|
||||
weight: 30
|
||||
keywords: Java, build, test
|
||||
description: How to build and run your Java tests
|
||||
aliases:
|
||||
- /language/java/run-tests/
|
||||
---
|
||||
|
||||
## Prerequisites
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Node.js language-specific guide
|
||||
linkTitle: Node.js
|
||||
description: Containerize and develop Node.js apps using Docker
|
||||
keywords: getting started, node, node.js
|
||||
title: Node.js language-specific guide
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/nodejs/
|
||||
---
|
||||
|
||||
The Node.js language-specific guide teaches you how to containerize a Node.js application using Docker. In this guide, you’ll learn how to:
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your Node.js application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: ci/cd, github actions, node.js, node
|
||||
description: Learn how to configure CI/CD using GitHub Actions for your Node.js application.
|
||||
aliases:
|
||||
- /language/nodejs/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -126,7 +130,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your Node.js application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,11 +1,14 @@
|
|||
---
|
||||
title: Containerize a Node.js application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: node.js, node, containerize, initialize
|
||||
description: Learn how to containerize a Node.js application.
|
||||
aliases:
|
||||
- /get-started/nodejs/build-images/
|
||||
- /language/nodejs/build-images/
|
||||
- /language/nodejs/run-containers/
|
||||
- /language/nodejs/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -227,8 +230,8 @@ You should now have at least the following contents in your
|
|||
```
|
||||
|
||||
To learn more about the files, see the following:
|
||||
- [Dockerfile](../../reference/dockerfile.md)
|
||||
- [.dockerignore](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Dockerfile](/reference/dockerfile.md)
|
||||
- [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||
- [compose.yaml](/reference/compose-file/_index.md)
|
||||
|
||||
|
||||
|
@ -274,9 +277,9 @@ In this section, you learned how you can containerize and run your Node.js
|
|||
application using Docker.
|
||||
|
||||
Related information:
|
||||
- [Dockerfile reference](../../reference/dockerfile.md)
|
||||
- [.dockerignore file reference](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Docker Compose overview](../../compose/_index.md)
|
||||
- [Dockerfile reference](/reference/dockerfile.md)
|
||||
- [.dockerignore file reference](/reference/dockerfile.md#dockerignore-file)
|
||||
- [Docker Compose overview](/manuals/compose/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your Node.js deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, kubernetes, node, node.js
|
||||
description: Learn how to deploy locally to test and debug your Kubernetes deployment
|
||||
aliases:
|
||||
- /language/nodejs/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -133,5 +137,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Use containers for Node.js development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: node, node.js, development
|
||||
description: Learn how to develop your Node.js application locally using containers.
|
||||
aliases:
|
||||
- /get-started/nodejs/develop/
|
||||
- /language/nodejs/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -270,7 +273,7 @@ have these variables defined yet.
|
|||
|
||||
## Configure and run a development container
|
||||
|
||||
You can use a bind mount to mount your source code into the container. The container can then see the changes you make to the code immediately, as soon as you save a file. This means that you can run processes, like nodemon, in the container that watch for filesystem changes and respond to them. To learn more about bind mounts, see [Storage overview](/engine/storage/index.md).
|
||||
You can use a bind mount to mount your source code into the container. The container can then see the changes you make to the code immediately, as soon as you save a file. This means that you can run processes, like nodemon, in the container that watch for filesystem changes and respond to them. To learn more about bind mounts, see [Storage overview](/manuals/engine/storage/index.md).
|
||||
|
||||
In addition to adding a bind mount, you can configure your Dockerfile and `compose.yaml` file to install development dependencies and run development tools.
|
||||
|
||||
|
@ -320,7 +323,7 @@ in other build stages. Next, you add a new build stage labeled `dev` to install
|
|||
your development dependencies and start the container using `npm run dev`.
|
||||
Finally, you add a stage labeled `prod` that omits the dev dependencies and runs
|
||||
your application using `node src/index.js`. To learn more about multi-stage
|
||||
builds, see [Multi-stage builds](../../build/building/multi-stage.md).
|
||||
builds, see [Multi-stage builds](/manuals/build/building/multi-stage.md).
|
||||
|
||||
Next, you'll need to update your Compose file to use the new stage.
|
||||
|
||||
|
@ -419,7 +422,7 @@ Dockerfile and set up a bind mount for development.
|
|||
Related information:
|
||||
- [Volumes top-level element](/reference/compose-file/volumes/)
|
||||
- [Services top-level element](/reference/compose-file/services/)
|
||||
- [Multi-stage builds](../../build/building/multi-stage.md)
|
||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Run Node.js tests in a container
|
||||
linkTitle: Run your tests
|
||||
weight: 30
|
||||
keywords: node.js, node, test
|
||||
description: Learn how to run your Node.js tests in a container.
|
||||
aliases:
|
||||
- /language/nodejs/run-tests/
|
||||
---
|
||||
|
||||
## Prerequisites
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: PHP language-specific guide
|
||||
linkTitle: PHP
|
||||
description: Containerize and develop PHP apps using Docker
|
||||
keywords: getting started, php, composer
|
||||
title: PHP language-specific guide
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/php/
|
||||
---
|
||||
|
||||
The PHP language-specific guide teaches you how to create a containerized PHP application using Docker. In this guide, you'll learn how to:
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your PHP application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: php, CI/CD
|
||||
description: Learn how to Configure CI/CD for your PHP application
|
||||
aliases:
|
||||
- /language/php/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -134,7 +138,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Containerize a PHP application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: php, containerize, initialize, apache, composer
|
||||
description: Learn how to containerize a PHP application.
|
||||
aliases:
|
||||
- /language/php/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -76,8 +80,8 @@ directory.
|
|||
```
|
||||
|
||||
To learn more about the files that `docker init` added, see the following:
|
||||
- [Dockerfile](../../reference/dockerfile.md)
|
||||
- [.dockerignore](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Dockerfile](/reference/dockerfile.md)
|
||||
- [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||
- [compose.yaml](/reference/compose-file/_index.md)
|
||||
|
||||
## Run the application
|
||||
|
@ -120,7 +124,7 @@ In this section, you learned how you can containerize and run a simple PHP
|
|||
application using Docker.
|
||||
|
||||
Related information:
|
||||
- [docker init reference](../../reference/cli/docker/init.md)
|
||||
- [docker init reference](/reference/cli/docker/init.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your PHP deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, php, local, development
|
||||
description: Learn how to deploy your application
|
||||
aliases:
|
||||
- /language/php/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -136,5 +140,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Use containers for PHP development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: php, development
|
||||
description: Learn how to develop your PHP application locally using containers.
|
||||
aliases:
|
||||
- /language/php/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -236,7 +240,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
|||
|
||||
## Automatically update services
|
||||
|
||||
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](../../compose/file-watch.md).
|
||||
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/file-watch.md).
|
||||
|
||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
|
||||
|
||||
|
@ -313,7 +317,7 @@ Press `ctrl+c` in the terminal to stop Compose Watch. Run `docker compose down`
|
|||
|
||||
## Create a development container
|
||||
|
||||
At this point, when you run your containerized application, Composer isn't installing the dev dependencies. While this small image is good for production, it lacks the tools and dependencies you may need when developing and it doesn't include the `tests` directory. You can use multi-stage builds to build stages for both development and production in the same Dockerfile. For more details, see [Multi-stage builds](../../build/building/multi-stage.md).
|
||||
At this point, when you run your containerized application, Composer isn't installing the dev dependencies. While this small image is good for production, it lacks the tools and dependencies you may need when developing and it doesn't include the `tests` directory. You can use multi-stage builds to build stages for both development and production in the same Dockerfile. For more details, see [Multi-stage builds](/manuals/build/building/multi-stage.md).
|
||||
|
||||
In the `Dockerfile`, you'll need to update the following:
|
||||
1. Split the `deps` staged into two stages. One stage for production
|
||||
|
@ -418,8 +422,8 @@ database and persist data. You also learned how to use Compose Watch to automati
|
|||
|
||||
Related information:
|
||||
- [Compose file reference](/reference/compose-file/)
|
||||
- [Compose file watch](../../compose/file-watch.md)
|
||||
- [Dockerfile reference](../../reference/dockerfile.md)
|
||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
||||
- [Dockerfile reference](/reference/dockerfile.md)
|
||||
- [Official Docker Image for PHP](https://hub.docker.com/_/php)
|
||||
|
||||
## Next steps
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Run PHP tests in a container
|
||||
linkTitle: Run your tests
|
||||
weight: 30
|
||||
keywords: php, test
|
||||
description: Learn how to run your PHP tests in a container.
|
||||
aliases:
|
||||
- /language/php/run-tests/
|
||||
---
|
||||
|
||||
## Prerequisites
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: Python language-specific guide
|
||||
linkTitle: Python
|
||||
description: Containerize Python apps using Docker
|
||||
keywords: Docker, getting started, Python, language
|
||||
title: Python language-specific guide
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/python/
|
||||
---
|
||||
|
||||
The Python language-specific guide teaches you how to containerize a Python application using Docker. In this guide, you’ll learn how to:
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your Python application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: ci/cd, github actions, python, flask
|
||||
description: Learn how to configure CI/CD using GitHub Actions for your Python application.
|
||||
aliases:
|
||||
- /language/python/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -119,7 +123,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your Python application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: Containerize a Python application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: python, flask, containerize, initialize
|
||||
description: Learn how to containerize a Python application.
|
||||
aliases:
|
||||
- /language/python/build-images/
|
||||
- /language/python/run-containers/
|
||||
- /language/python/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -315,8 +318,8 @@ directory.
|
|||
```
|
||||
|
||||
To learn more about the files, see the following:
|
||||
- [Dockerfile](../../reference/dockerfile.md)
|
||||
- [.dockerignore](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Dockerfile](/reference/dockerfile.md)
|
||||
- [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||
- [.gitignore](https://git-scm.com/docs/gitignore)
|
||||
- [compose.yaml](/reference/compose-file/_index.md)
|
||||
|
||||
|
@ -364,7 +367,7 @@ In this section, you learned how you can containerize and run your Python
|
|||
application using Docker.
|
||||
|
||||
Related information:
|
||||
- [Docker Compose overview](../../compose/_index.md)
|
||||
- [Docker Compose overview](/manuals/compose/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your Python deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, kubernetes, python
|
||||
description: Learn how to develop locally using Kubernetes
|
||||
aliases:
|
||||
- /language/python/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -247,5 +251,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Use containers for Python development
|
||||
linkTitle: Develop your app
|
||||
weight: 20
|
||||
keywords: python, local, development
|
||||
description: Learn how to develop your Python application locally.
|
||||
aliases:
|
||||
- /language/python/develop/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -469,7 +473,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
|||
|
||||
Use Compose Watch to automatically update your running Compose services as you
|
||||
edit and save your code. For more details about Compose Watch, see [Use Compose
|
||||
Watch](../../compose/file-watch.md).
|
||||
Watch](/manuals/compose/file-watch.md).
|
||||
|
||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose
|
||||
Watch instructions. The following is the updated `compose.yaml` file.
|
||||
|
@ -558,8 +562,8 @@ database and persist data. You also learned how to use Compose Watch to automati
|
|||
|
||||
Related information:
|
||||
- [Compose file reference](/reference/compose-file/)
|
||||
- [Compose file watch](../../compose/file-watch.md)
|
||||
- [Multi-stage builds](../../build/building/multi-stage.md)
|
||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
title: R language-specific guide
|
||||
linkTitle: R
|
||||
description: Containerize R apps using Docker
|
||||
keywords: Docker, getting started, R, language
|
||||
title: R language-specific guide
|
||||
toc_min: 1
|
||||
toc_max: 2
|
||||
aliases:
|
||||
- /language/r/
|
||||
---
|
||||
The R language-specific guide teaches you how to containerize a R application using Docker. In this guide, you’ll learn how to:
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Configure CI/CD for your R application
|
||||
linkTitle: Configure CI/CD
|
||||
weight: 40
|
||||
keywords: ci/cd, github actions, R, shiny
|
||||
description: Learn how to configure CI/CD using GitHub Actions for your R application.
|
||||
aliases:
|
||||
- /language/r/configure-ci-cd/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -27,7 +31,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your
|
|||
|
||||
3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value.
|
||||
|
||||
4. Create a new [Personal Access Token (PAT)](../../security/for-developers/access-tokens.md/#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token) for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write.
|
||||
|
||||
5. Add the PAT as a **Repository secret** in your GitHub repository, with the name
|
||||
`DOCKERHUB_TOKEN`.
|
||||
|
@ -119,7 +123,7 @@ Save the workflow file and run the job.
|
|||
In this section, you learned how to set up a GitHub Actions workflow for your R application.
|
||||
|
||||
Related information:
|
||||
- [Introduction to GitHub Actions](../../build/ci/github-actions/_index.md)
|
||||
- [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md)
|
||||
- [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
|
||||
|
||||
## Next steps
|
|
@ -1,10 +1,13 @@
|
|||
---
|
||||
title: Containerize a R application
|
||||
linkTitle: Containerize your app
|
||||
weight: 10
|
||||
keywords: R, containerize, initialize
|
||||
description: Learn how to containerize a R application.
|
||||
aliases:
|
||||
- /language/R/build-images/
|
||||
- /language/R/run-containers/
|
||||
- /language/r/containerize/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -40,8 +43,8 @@ directory.
|
|||
```
|
||||
|
||||
To learn more about the files in the repository, see the following:
|
||||
- [Dockerfile](../../reference/dockerfile.md)
|
||||
- [.dockerignore](../../reference/dockerfile.md#dockerignore-file)
|
||||
- [Dockerfile](/reference/dockerfile.md)
|
||||
- [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||
- [compose.yaml](/reference/compose-file/_index.md)
|
||||
|
||||
## Run the application
|
||||
|
@ -86,7 +89,7 @@ In this section, you learned how you can containerize and run your R
|
|||
application using Docker.
|
||||
|
||||
Related information:
|
||||
- [Docker Compose overview](../../compose/_index.md)
|
||||
- [Docker Compose overview](/manuals/compose/_index.md)
|
||||
|
||||
## Next steps
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
title: Test your R deployment
|
||||
linkTitle: Test your deployment
|
||||
weight: 50
|
||||
keywords: deploy, kubernetes, R
|
||||
description: Learn how to develop locally using Kubernetes
|
||||
aliases:
|
||||
- /language/r/deploy/
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
@ -137,5 +141,5 @@ In this section, you learned how to use Docker Desktop to deploy your applicatio
|
|||
|
||||
Related information:
|
||||
- [Kubernetes documentation](https://kubernetes.io/docs/home/)
|
||||
- [Deploy on Kubernetes with Docker Desktop](../../desktop/kubernetes.md)
|
||||
- [Swarm mode overview](../../engine/swarm/_index.md)
|
||||
- [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/kubernetes.md)
|
||||
- [Swarm mode overview](/manuals/engine/swarm/_index.md)
|