tarampampam / indocker-app

💥 Domain names with valid SSL for your local docker containers

Home Page:https://indocker.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

 

tests release docker license

This project previously was called localhost.tools

One time you may want to run docker containers locally and interact with they're using domain names instead of different TCP/UDP ports. And in addition - you want to use HTTPS protocol for this. This is what this project is about.

I've registered a domain name indocker.app and configured it to point any subdomain to your local machine:

$ dig +noall +answer -t A foo.indocker.app # IPv4
foo.indocker.app.	7131	IN	A	127.0.0.1

$ dig +noall +answer -t AAAA foo.indocker.app # IPv6
foo.indocker.app.	86400	IN	AAAA	::1

$ dig +noall +answer foo.bar.baz.indocker.app # any depth
foo.bar.baz.indocker.app. 86400	IN	A	127.0.0.1

Ok, but how to use it?

It's very simple :) To connect locally run docker containers with subdomains in zone indocker.app, we need a reverse proxy server, which will be able to handle requests to *.indocker.app and forward them to the required locally run docker containers.

So I decided to use traefik with a wildcard SSL certificate from Let's Encrypt, put it together in a docker image, and publish it.

As you probably know, traefik has a built-in feature named "configuration discovery", which allows you to configure it using docker container labels (that's why it needs a docker socket to be mounted).

All we have to do is run it, the necessary containers with the required labels, and Viola! It works! More details you can find on the website of the project: indocker.app.

Where is the docker image?

Here: quay.io/indocker/app:1 (~40 Mb download size).

From time to time (about once every 2 months) you need to update it. To do this, you need to run the following command:

$ docker pull quay.io/indocker/app:<used-tag>

Additional features

  • You can mount any dynamic config file (with your middlewares, routers, and services) to the /etc/traefik/dynamic directory inside the image, and it will be automatically loaded by traefik (eg.: /etc/traefik/dynamic/my-custom-config.yaml)

License

This is open-sourced software licensed under the MIT License.

About

💥 Domain names with valid SSL for your local docker containers

https://indocker.app

License:MIT License


Languages

Language:Go 59.9%Language:Shell 23.0%Language:Dockerfile 12.5%Language:JavaScript 4.6%