Comments (2)
Not currently but it wouldn't be too hard. Dinghy would need a way to configure more than one TLD, then pass it on to the DNS service and resolver file creation code. The HTTP proxy doesn't actually care what the TLD is. So in theory you could even just add entries on other TLDs to /etc/hosts
pointing to the VM and the HTTP proxy would serve them.
from dinghy-http-proxy.
The solution that works for me right now
In the process of replying with some more information on this issue I figured out a workaround that works great for my own usecase.
I manually make /etc/resolver/<filename>
entries for the TLD's I want to use.
I use the following to start the container:
docker run -d --restart=always \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
-v ~/.dinghy/certs:/etc/nginx/certs \
-p 80:80 -p 443:443 -p 19322:19322/udp \
-e DOMAIN_TLD='#' -e CONTAINER_NAME=http-proxy \
--name http-proxy \
codekitchen/dinghy-http-proxy
DNSMasq treats the #
entry as a wildcard entry.
This does produce a bunch of useless nginx entries, such as web.voziv.#
but nginx doesn't seem to mind it at all. I use docker-compose.yml
and specify my hosts for each container there and those entries come through just fine. So far it seems nginx is serving them all up normally.
Now when I visit both domains I get the nginx proxy default page.
http://test.docker
http://test.dev
Automated solution
Some other automated options could be adding to dnsmasq.conf
.
In dnsmasq.conf
we could add conf-dir=/etc/dnsmasq.d
and create a file per domain, or a single file with multiple address lines.
Example:
address=/docker/<docker vm ip>
address=/dev/<docker vm ip>
address=/example.com/<docker vm ip>
Not sure how to go about passing in multiple TLD's through environment variables though.
The first solution works really well for me, so I don't need this issue anymore. Feel free to close the issue if you'd like.
Edit: I figured the wildcard bit out by looking at the FreedomBen/dory-dnsmasq - Wildcard TLD
from dinghy-http-proxy.
Related Issues (20)
- Network auto joining doesn't work since Docker 17.04 HOT 8
- increase client_header_buffer_size HOT 3
- Can't stop redirect to HTTPS HOT 4
- quickly generate self-signed certificates
- dinghy not picking SSL HOT 5
- new cert and docker tag change broke old dinghy behaviour HOT 4
- SSL enablement: Unable to mount volumes HOT 3
- Access MySQL from the host environment directly. HOT 2
- Possibility to turn off HSTS HOT 1
- docker: Error response from daemon: unauthorized: incorrect username or password. HOT 2
- driver failed programming external connectivity on endpoint proxy HOT 8
- Swarm mode DNS HOT 3
- Automate DockerHub builds when jwilder/nginx-proxy updates HOT 3
- export port 443
- port 443 https doesnt work
- Enabling CORS on one vhost enables it on all vhosts
- Bring across VIRTUAL_PATH support from the jwilder proxy HOT 1
- Enable CORS on specific domains
- Resolving address in container via dinghy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dinghy-http-proxy.