docs: update wording - add link descriptions

This commit is contained in:
sven 2023-04-05 14:16:06 +02:00 committed by GitHub
parent 4c9765b52d
commit 0d1bb72306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +1,12 @@
--- ---
title: "Traefik Docker Documentation" title: "Traefik Docker Documentation"
description: "This guide covers a basic docker-compose file exposing a simple service using the docker provider in Traefik Proxy. Read the technical documentation." description: "This guide covers a Docker Compose file exposing a service using the Docker provider in Traefik Proxy. Read the technical documentation."
--- ---
# Docker-compose basic example # Docker Compose example
In this section we quickly go over a basic docker-compose file exposing a simple service using the docker provider. In this section, we quickly go over a Docker Compose file exposing a service using the Docker provider.
This will also be used as a starting point for the other docker-compose guides. This will also be used as a starting point for the other Docker Compose guides.
## Setup ## Setup
@ -19,9 +19,9 @@ This will also be used as a starting point for the other docker-compose guides.
??? Networking ??? Networking
The Traefik container has to be attached to the same network as the containers to be exposed. The Traefik container has to be attached to the same network as the containers to be exposed.
If no networks are specified in the docker-compose file, Docker creates a default one that allows Traefik to reach the containers defined in the same file. If no networks are specified in the Docker Compose file, Docker creates a default one that allows Traefik to reach the containers defined in the same file.
You can [customize the network](https://docs.docker.com/compose/networking/#specify-custom-networks) as described in the example below. You can [customize the network](https://docs.docker.com/compose/networking/#specify-custom-networks "Link to docs about custom networks with Docker Compose") as described in the example below.
You can use a [pre-existing network](https://docs.docker.com/compose/networking/#use-a-pre-existing-network) too. You can use a [pre-existing network](https://docs.docker.com/compose/networking/#use-a-pre-existing-network "Link to Docker Compose networking docs") too.
```yaml ```yaml
version: "3.3" version: "3.3"
@ -49,7 +49,7 @@ This will also be used as a starting point for the other docker-compose guides.
- Run `docker-compose up -d` within the folder where you created the previous file. - Run `docker-compose up -d` within the folder where you created the previous file.
- Wait a bit and visit `http://your_own_domain` to confirm everything went fine. - Wait a bit and visit `http://your_own_domain` to confirm everything went fine.
You should see the output of the whoami service. Something similar to: You should see the output of the whoami service. Something similar to:
```text ```text
Hostname: d7f919e54651 Hostname: d7f919e54651
IP: 127.0.0.1 IP: 127.0.0.1
@ -69,9 +69,9 @@ This will also be used as a starting point for the other docker-compose guides.
## Details ## Details
- As an example we use [whoami](https://github.com/traefik/whoami) (a tiny Go server that prints os information and HTTP request to output) which was used to define our `simple-service` container. - As an example, we use [whoami](https://github.com/traefik/whoami "Link to the GitHub repo of whoami") (a tiny Go server that prints OS information and HTTP request to output) which was used to define our `simple-service` container.
- We define an entry point, along with the exposure of the matching port within docker-compose, which basically allow us to "open and accept" HTTP traffic: - We define an entry point, along with the exposure of the matching port within Docker Compose, which allow us to "open and accept" HTTP traffic:
```yaml ```yaml
command: command:
@ -95,8 +95,8 @@ ports:
!!! Note !!! Note
If you are working on a remote server, you can use the following command to display configuration (require `curl` & `jq`): If you are working on a remote server, you can use the following command to display configuration (require `curl` & `jq`):
```bash ```bash
curl -s 127.0.0.1:8080/api/rawdata | jq . curl -s 127.0.0.1:8080/api/rawdata | jq .
``` ```
@ -106,7 +106,7 @@ ports:
```yaml ```yaml
traefik: traefik:
command: command:
# Enabling docker provider # Enabling Docker provider
- "--providers.docker=true" - "--providers.docker=true"
# Do not expose containers unless explicitly told so # Do not expose containers unless explicitly told so
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"