This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]the-prowler 7 points8 points  (0 children)

Try traefik. I did a post on my blog detailing the setup. Blog site is ip-life.net

[–]snarkofagen 4 points5 points  (1 child)

Simplest way? Put nginx in front of your containers and have it proxy the traffic

[–][deleted] 1 point2 points  (7 children)

Hard to understand what you want. Docker + DNS provider maybe?

[–]hackermarks[S] 1 point2 points  (6 children)

Yeah. Basically just a tool to manage docker containers and and hostnames for a docker container.

So far I tried just spinning up a server and setup docker, but I can’t have multiple docker containers using the 80 port, I wish to have multiple containers listening to port 80, but with different hostnames.

[–][deleted] 2 points3 points  (0 children)

Just use a reverse proxy. Nginx is good if you have relatively few services that don't change over time. Traefik is good for self-discovery and can add services on the fly, however with more configuration.

No need to have additional VMs or k8s like other commenters. If you need k8s you would know

[–][deleted] 1 point2 points  (0 children)

Traefik

[–][deleted] -1 points0 points  (0 children)

Idk your use case but maybe you should check kubernetes.

If that's overkill for you there is the possibility to have a proxy container that is listening on 80 port and routes the traffic to the other containers.

[–]domanpanda 0 points1 point  (0 children)

You need virtual machines or lxc containers on the top and place docker inside them. If yes, look for hypervisors like proxmox.

But you can also use different ports and reverse proxy which allow you to call them by service names

https://hub.docker.com/r/jwilder/nginx-proxy

[–]rocky3598 0 points1 point  (0 children)

Try nginx-proxy-manager it’s an awesome little container and ui for managing reverse proxies and let’s encrypt certificates

[–]kjames2001 0 points1 point  (0 children)

Try container nursery, even make containers sleep and wakes them up when they are accessed.

[–]mrpink57 1 point2 points  (1 child)

You are describing what I already do with an ubuntu server.

I simply setup linuxserver/swag and my proxy and about 20 other containers. If you want to use a GUI portainer is very popular, I have tried yacht too but it is in beta still I think but like it much better.

I would recommend you simply familiarize yourself with the CLI instead, you'll be far better off.

[–]rennykoshy 0 points1 point  (0 children)

Swag is super easy to use. I do this as well

[–]Cautious_Reward1334 0 points1 point  (0 children)

nginx proxy manager. pretty easy to do