• Stars
    star
    131
  • Rank 266,111 (Top 6 %)
  • Language
    Dockerfile
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Used to build Official Docker image of Traefik Proxy

Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy.

Traefik integrates with your existing infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, ...) and configures itself automatically and dynamically.

Pointing Traefik at your orchestrator should be the only configuration step you need.

Traefik v2 - Example usage

Enable docker provider and web UI:

## traefik.yml

# Docker configuration backend
providers:
  docker:
    defaultRule: "Host(`{{ trimPrefix `/` .Name }}.docker.localhost`)"

# API and dashboard configuration
api:
  insecure: true

Start Traefik:

docker run -d -p 8080:8080 -p 80:80 \
-v $PWD/traefik.yml:/etc/traefik/traefik.yml \
-v /var/run/docker.sock:/var/run/docker.sock \
traefik:v2.5

Start a backend server, named test:

docker run -d --name test traefik/whoami

And finally, you can access to your whoami server throught Traefik, on the domain name test.docker.localhost:

# $ curl --header 'Host:test.docker.localhost' 'http://localhost:80/'
$ curl test.docker.localhost
Hostname: 390a880bdfab
IP: 127.0.0.1
IP: 172.17.0.3
GET / HTTP/1.1
Host: test.docker.localhost
User-Agent: curl/7.65.3
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 172.17.0.1
X-Forwarded-Host: test.docker.localhost
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: 7e073cb54211
X-Real-Ip: 172.17.0.1

The web UI http://localhost:8080 will give you an overview of the routers, services, and middlewares.

Web UI

Traefik v1 - Example usage

Grab a sample configuration file and rename it to traefik.toml. Enable docker provider and web UI:

## traefik.toml

# API and dashboard configuration
[api]

# Docker configuration backend
[docker]
  domain = "docker.localhost"

Start Traefik:

docker run -d -p 8080:8080 -p 80:80 \
-v $PWD/traefik.toml:/etc/traefik/traefik.toml \
-v /var/run/docker.sock:/var/run/docker.sock \
traefik:v1.7

Start a backend server, named test:

docker run -d --name test traefik/whoami

And finally, you can access to your whoami server throught Traefik, on the domain name {containerName}.{configuredDomain} (test.docker.localhost):

# $ curl --header 'Host:test.docker.localhost' 'http://localhost:80/'
$ curl 'http://test.docker.localhost'
Hostname: 117c5530934d
IP: 127.0.0.1
IP: ::1
IP: 172.17.0.3
IP: fe80::42:acff:fe11:3
GET / HTTP/1.1
Host: test.docker.localhost
User-Agent: curl/7.35.0
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 172.17.0.1
X-Forwarded-Host: 172.17.0.3:80
X-Forwarded-Proto: http
X-Forwarded-Server: f2e05c433120

The web UI http://localhost:8080 will give you an overview of the frontends/backends and also a health dashboard.

Web UI Providers

Documentation

You can find the complete documentation:

A community support is available at https://community.traefik.io

A collection of contributions around Traefik can be found at https://awesome.traefik.io.

More Repositories

1

traefik

The Cloud Native Application Proxy
Go
47,533
star
2

yaegi

Yaegi is Another Elegant Go Interpreter
Go
6,609
star
3

mesh

Traefik Mesh - Simpler Service Mesh
Go
1,979
star
4

traefik-helm-chart

Traefik Proxy Helm Chart
Smarty
939
star
5

whoami

Tiny Go server that prints os information and HTTP request to output
Go
906
star
6

mocktail

Naive code generator that creates mock implementation using testify.mock
Go
199
star
7

traefik-migration-tool

A migration tool from Traefik v1 to Traefik v2
Go
146
star
8

plugindemo

This repository includes an example plugin, for you to use as a reference for developing your own plugins
Go
121
star
9

blog-posts

Jinja
61
star
10

plugin-rewritebody

Rewrite body is a middleware plugin for Traefik which rewrites the HTTP response body by replacing a search regex by a replacement string
Go
50
star
11

paerser

Loads configuration from many sources
Go
47
star
12

plugin-simplecache

Simple cache plugin middleware caches responses on disk
Go
40
star
13

structor

[Messor Structor 🐜] Manage multiple versions of a Mkdocs documentation
Go
37
star
14

plugin-log4shell

Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values
Go
37
star
15

faency

Faency is the Traefik Labs React component library
TypeScript
36
star
16

hub-agent-traefik

Traefik Hub agent for Traefik
Go
34
star
17

lobicornis

πŸ€– [Myrmica Lobicornis 🐜] Bot: Update and Merge Pull Request
Go
29
star
18

hub-agent-kubernetes

Traefik Hub agent for Kubernetes
Go
19
star
19

aloba

πŸ€– [Myrmica Aloba 🐜] Bot: Add labels and milestone on pull requests and issues
Go
18
star
20

whoamitcp

Tiny Go server that prints os information and TCP request to output
Go
17
star
21

plugin-blockpath

Block Path is a middleware plugin for Traefik which sends an HTTP 403 Forbidden response when the requested HTTP path matches one the configured regular expressions
Go
15
star
22

pluginproviderdemo

This repository includes an example provider plugin, for you to use as a reference for developing your own plugins
Go
13
star
23

mesh-helm-chart

Traefik Mesh - Helm Chart
Mustache
13
star
24

whoamiudp

Tiny Go webserver that prints os information and UDP request to output
Go
9
star
25

gallienii

πŸ€– [Myrmica Gallienii 🐜] Bot: Keep Forks Synchronized
Go
8
star
26

hub-helm-chart

Traefik Hub helm chart
Smarty
5
star
27

yaegi-talk

Talks about Yaegi
Go
4
star
28

contributors-guide

Contributors Guide
4
star
29

bibikoffi

πŸ€– [Myrmica Bibikoffi 🐜] Bot: Closes stale issues
Go
4
star
30

kutteri

πŸ€– [Chalepoxenus Kutteri 🐜] Bot: Track a GitHub repository and publish on Slack
Go
3
star
31

seo-doc

This program aims to process a documentation folder from traefik/doc and iterate each HTML file adding the requirements for a better SEO
HTML
3
star
32

plugindemowasm

This repository includes an example wasm plugin, for you to use as a reference for developing your own plugins
Go
3
star
33

traefikee-helm-chart

This chart installs the Traefik Enterprise on a Kubernetes cluster, an optional subchart of Traefik Mesh is also bundled
Smarty
3
star
34

traefik-hub-helm-chart

Traefik Hub is a Kubernetes-native API Management solution for publishing, securing, and managing APIs. Configuration is driven by Kubernetes CRDs, labels, and selectors for effective GitOps.
Makefile
2
star
35

traefiklabs-header-app

This Project aims to solve the issue to have a consistent header in many sites running different frameworks.
TypeScript
1
star
36

hub-apiportal-ui

CSS
1
star
37

homebrew-tap

Ruby
1
star
38

mixtus

πŸ€– [Lasius Mixtus 🐜] Bot: Publish Documentation to a GitHub Repository from another
Go
1
star
39

discourse-theme

Theme of Discourse Community Forum
SCSS
1
star