freedomben / dory Goto Github PK
View Code? Open in Web Editor NEWYour development proxy for docker
License: MIT License
Your development proxy for docker
License: MIT License
I'm a little confused on how to use SSL with this gem.
I know from my experience with dinghy-http-proxy that if I put my certificates with a certain name in a certain directory, it will automatically redirect to HTTPS and use the named certs. As explained here: https://github.com/codekitchen/dinghy-http-proxy#ssl-support
Does this package include that feature? and if it does where do I put my certificates?
Thanks
Hi,
I really like the xip.io approach and we are in the process of doing the same but internally in our organisation. Is it possible to customize dory to support the same principle as xip.io but with a custom host ?
Using the localhost hack (dnsmasq resolving .docker hosts to 172.17.0.1, and aliasing lo0 to 172.17.0.1) access to the proxy server from within the containers no longer possible when using DfM 4.1.1. The HTTP request just hangs.
I have disabled V2 compose as that was wreaking other kinds of havoc (thank you, Docker!).
This is the proxy server. I have tested a few scenarios with 4.0.1 and 4.1.1, here are the results:
dory attach proxy
output is monitored by me
dory attach proxy
output is monitored by me
At first I was suspecting some kind of network filtering to be the issue. However, the 4.1.1 dory down trials look like there is no magic filtering going on, at least on the surface level. I don't know if dory's logging level can somehow be raised to see if the request even makes it to the container.
... I was quickly trying to setup Canvas and dory killed my entire network. It looks interesting... specially as a k8s dev. but I want to start over.
How do we uninstall everything and fix NetworkManager/DNSMasq back to how it was?
Does this run on Crostini/ChromeOS Debian linux VM's? I do most of my work on ChromeOS Linux
Step 1: dory down
Step 2: sudo gem uninstall dory
Step 3: Depends... easiest thing to do is just restart your computer/vm. Otherwise try to start NetworkManager and reset your interfaces.
Hi,
Dinghy for OS X, has a feature where you can connect back to your host machine from within a docker container.
https://github.com/codekitchen/dinghy#dns
You can also connect back to your host OS X machine from within a docker container using the hostname hostmachine.docker. This connects to the virtual network interface, so any services running on the host machine that you want reachable from docker will have to be listening on this interface.
We have multiple microservices running on different networks, when one of my backends tries to communicate with another I get this error - cURL error 6: Could not resolve host: microservice-2.docker (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
I am using Ubuntu 18.04.
All my coworkers use MacOS with dinghy and it works for them.
Is there a way to make this work with dory?
Thank You
I've tried to install dory using gem install dory
using ruby 1.9 and ruby 2.0. In both cases, after installing, running any dory command threw a syntax error.
I've retried with ruby 2.3, and it worked.
I don't see any ruby related requirements in the README file. I would suggest to add some information about this.
Hello, when running dory start, or similar commands like dory status, dory stop, where it needs docker_service, I run into this issue:
dory start
'
/opt/homebrew/Cellar/dory/1.2.0/libexec/gems/dory-1.2.0/lib/dory/docker_service.rb:52:inrunning?': invalid byte sequence in US-ASCII (ArgumentError) from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/dory-1.2.0/lib/dory/docker_service.rb:30:in
start'
from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/dory-1.2.0/bin/dory:330:inexec_up' from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/dory-1.2.0/bin/dory:43:in
up'
from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/thor-1.2.1/lib/thor/command.rb:27:inrun' from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
invoke_command'
from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/thor-1.2.1/lib/thor.rb:392:indispatch' from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/thor-1.2.1/lib/thor/base.rb:485:in
start'
from /opt/homebrew/Cellar/dory/1.2.0/libexec/gems/dory-1.2.0/bin/dory:532:in<top (required)>' from /opt/homebrew/Cellar/dory/1.2.0/libexec/bin/dory:25:in
load'
from /opt/homebrew/Cellar/dory/1.2.0/libexec/bin/dory:25:in `
My system:
Dory: 1.2.0
Docker Engine: v20.10.22
Docker desktop: 4.16.2 (95914)
MacOS Monterey 12.5, Macbook Pro 2021, Chip Apple M1 Max
Hey @FreedomBen it sounds like Dory continues to use dinghy-http-proxy (just in some cases)? I'm not actively using or maintaining that project anymore, would it make sense for Dory to take over ownership of that project? Or alternatively remove the cases where it is used by Dory?
This is in reference to codekitchen/dinghy-http-proxy#59 which sat unanswered for 3 months, to my shame.
when I try to start dory I have the following error:
$ dory start
<internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- /usr/lib/ruby/gems/3.0.0/gems/dory-1.1.1/lib/dory/config (LoadError)
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/dory-1.1.1/lib/dory.rb:2:in `block in <top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/dory-1.1.1/lib/dory.rb:1:in `each'
from /usr/lib/ruby/gems/3.0.0/gems/dory-1.1.1/lib/dory.rb:1:in `<top (required)>'
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/dory-1.1.1/bin/dory:7:in `<top (required)>'
from /usr/bin/dory:23:in `load'
from /usr/bin/dory:23:in `<main>'
I can see that it's the only file that is not readable by any user
$ ls -la /usr/lib/ruby/gems/3.0.0/gems/dory-1.1.1/lib/dory/
total 68
drwxr-xr-x 3 root root 4096 29 avr 17:19 .
drwxr-xr-x 3 root root 4096 29 avr 17:19 ..
-rw-r----- 1 root root 4911 15 avr 18:55 config.rb
-rw-r--r-- 1 root root 711 15 avr 18:55 dinghy.rb
-rw-r--r-- 1 root root 7771 15 avr 18:55 dnsmasq.rb
-rw-r--r-- 1 root root 3154 15 avr 18:55 docker_service.rb
-rw-r--r-- 1 root root 1141 15 avr 18:55 os.rb
-rw-r--r-- 1 root root 763 15 avr 18:55 port_utils.rb
-rw-r--r-- 1 root root 1548 15 avr 18:55 proxy.rb
drwxr-xr-x 2 root root 4096 29 avr 17:19 resolv
-rw-r--r-- 1 root root 662 15 avr 18:55 resolv.rb
-rw-r--r-- 1 root root 582 15 avr 18:55 shell.rb
-rw-r--r-- 1 root root 1362 15 avr 18:55 systemd.rb
-rw-r--r-- 1 root root 545 15 avr 18:55 upgrade.rb
-rw-r--r-- 1 root root 93 15 avr 18:55 version.rb
if I run dory with sudo
, it's working but I should not need it (only for the restart of network)
is the problem come from this gem or from the packaging to archlinux?
I am considering using dory for my OSX dev env, but I am probably missing something. I want to use the reverse proxy to connect to my postgres service, and not having much success.
Here's what I am starting with. An empty repository with nothing but this docker-compose.yml
, taken from the example on the README:
version: '2'
services:
redis:
image: redis
environment:
VIRTUAL_HOST: redis.docker
VIRTUAL_PORT: 6379
db:
image: postgres
environment:
VIRTUAL_HOST: postgres.docker
VIRTUAL_PORT: 5432
After this is spun up, I expected to be able to connect to redis via redis.docker:6379
, but no luck. However, I could connect to redis if I went to port 80.
Curious, I went into the http proxy container and looked at the nginx config, and realized that the config for redis looked like this:
upstream redis.docker {
server 172.20.0.2:6379;
}
server {
server_name redis.docker ~^redis.docker\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
listen 80;
access_log /var/log/nginx/access.log vhost;
listen 443 ssl;
ssl_certificate /etc/nginx/certs/default.crt;
ssl_certificate_key /etc/nginx/certs/default.key;
location / {
proxy_pass http://redis.docker;
}
}
This looked to me like it's actually listening on port 80 coming in from the host, which would explain why trying to connect to 80 worked, contrary to the example shown in the README.
I could live with that, however, I am not able to get this to work at all with the postgres container, when trying to connect with postgres.docker:80
, I get this error:
psql: received invalid response to SSL negotiation: H
My first thought is that because proxy_pass http://postgres.docker;
is only meant for http traffic, so it wouldn't work with postgres, but I am not an expert on this.
I am running Docker For Mac 17.09.0-ce-mac35, and default settings for dory.
What am I doing wrong?
I haven't been on Linux for a long time, so someone could might point me in the correct direction:
I tried spinning up a VM with Debian using Vagrant cloud and install docker and dory with Homebrew on Linux.
After installing dory with Homebrew I get the following when starting Dory: invalid byte sequence in US-ASCII (ArgumentError)
.
I figured I had to do sudo dpkg-reconfigure locales
and select en_US.UTF-8
; then I did export LC_ALL="en_US.UTF-8"
and it worked perfectly.
Any idea what this could be and if it is usually necessary?
I have a feeling it's not correct to put it in the README or in the Brew formula but unsure what we be the best way to solve this.
It's me again, I'll get you (if not already ^^) tired of reading my issues if I continue so I'll try to avoid problems in the future, I swear. But as for now, dory doesn't want to talk to my app.
It's very very strange. I tried dory for the first time with nightwatch-docker-grid and it worked (except that any .docker
terminated url matches the helloworld container used in the project as explained on #13 (comment)). But when I run my project, dory tries to access the wrong service from the container.
My compose file is pretty simple and looks like:
version: '2'
volumes:
mongo-volume:
services:
main_service:
build: .
volumes:
- ../src:/var/www/app
environment:
STATE: dev
WEBROOT: /var/www/app
VIRTUAL_HOST: custom-url.docker
depends_on:
- mongo_service
mongo_service:
image: mongo:3.5
volumes:
- mongo-volume:/data/db
Now an image showing all of the containers on my machine after launching
and wherever I put VIRTUAL_HOST
, dory still tries to access mongo_service
resulting in:
mongo_service_1 | 2017-08-29T14:05:39.560+0000 I NETWORK [conn6] Error receiving request from client: SSLHandshakeFailed: SSLHandshakeFailed. Ending connection from 172.18.0.3:49812 (connection id: 6)
mongo_service_1 | 2017-08-29T14:05:39.560+0000 I NETWORK [conn6] end connection 172.18.0.3:49812 (3 connections now open)
although it should be main_service_1
which should be receiving the request.
My confusion is at its highest and I'm sadly forced to back down on dory and return to old dirt /etc/hosts editting which is bad bad bad because docker changes ip all the time...
P.S.: my environment is the same since #13 (comment)
To use paswordless resolver add we need to change tee
to /usr/bin/tee
After this you can use the sudors
Cmnd_Alias DORY_EDIT_RESOLVCONF = /usr/bin/tee /etc/resolv.conf
Cmnd_Alias DORY_EDIT_RESOLVDOCKER = /usr/bin/tee /etc/resolver/docker
%admin ALL=(ALL) NOPASSWD: DORY_EDIT_RESOLVCONF, DORY_EDIT_RESOLVDOCKER
It'd be really useful if dory supported xip.io virtual hostnames.
This would allow access to running containers from other devices on the LAN, which is really useful for example when testing web apps on mobile devices.
The project Varying-Vagrant-Vagrants/VVV implements this in a really nice way. A similar approach here would work well, I think.
So, for example, I could have a container running with VIRTUAL_HOST
of example.docker
, and my host IP address is 192.168.0.10
. From a mobile device on the same network, I'd be able to access the container by going to http://example.docker.192.168.0.10.xip.io
(since this would resolve to the host IP).
It looks like dory-http-proxy
already binds to 0.0.0.0
, so the server will be accessible from other devices on the network.
The only missing piece is adding a xip.io hostname regex to each virtual host's server_name
entry in the nginx configuration. Something like this should work (inspired by VVV):
server {
server_name example.docker ~^example\.docker\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
}
Hello, is it possible to specify location of config file instad using default ~/.dory.yml?
This is annoying cause it "succeeds" but is then immediately overwritten, which mean you gotta run up twice. Suggested fix is to add a small delay after putting up NetworkManager to give it time to update resolv.conf before we edit it.
Hello, I have some problems starting dory. Output of dory start
Successfully started nginx proxy
Successfully started dnsmasq
Requesting sudo to write to /etc/resolv.conf
--status to see details about the actual nameserver 127.0.0.1 # added by dory
nameservers.
nameserver 127.0.0.53' | sudo tee /etc/resolv.conf >/dev/null: -c: line 0: unexpected EOF while looking for matching `''
--status to see details about the actual nameserver 127.0.0.1 # added by dory
nameservers.
nameserver 127.0.0.53' | sudo tee /etc/resolv.conf >/dev/null: -c: line 4: syntax error: unexpected end of file
Error configuring local resolver
I'm running an almost fresh Kubuntu 17.04.
ruby -v
prints ruby 2.3.3p222
and I got it from rvm.
dory -v
yields Dory - Version: 0.5.2
.dory.yml:
---
dory:
dnsmasq:
enabled: true
domains: # array of domains that will be resolved to the specified address
- domain: docker # you can set '#' for a wilcard
address: 127.0.0.1 # return for queries against the domain
- domain: dev
address: 127.0.0.1
container_name: dory_dnsmasq
port: 53 # port to listen for dns requests on. must be 53 on linux. can be anything that's open on macos
kill_others: yes
nginx_proxy:
enabled: true
container_name: dory_dinghy_http_proxy
https_enabled: true
ssl_certs_dir: '' # leave as empty string to use default certs
resolv:
enabled: true
nameserver: 127.0.0.1
port: 53 # port where the nameserver listens. On linux it must be 53
I'd love this proxy on my desktop (I use dinghy on Mac) but I've ran out of possible ideas ๐
Traceback (most recent call last):
9: from /usr/local/bin/dory:23:in <main>' 8: from /usr/local/bin/dory:23:in
load'
7: from /var/lib/gems/2.7.0/gems/dory-1.1.1/bin/dory:7:in <top (required)>' 6: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
require'
5: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' 4: from /var/lib/gems/2.7.0/gems/dory-1.1.1/lib/dory.rb:1:in
<top (required)>'
3: from /var/lib/gems/2.7.0/gems/dory-1.1.1/lib/dory.rb:1:in each' 2: from /var/lib/gems/2.7.0/gems/dory-1.1.1/lib/dory.rb:2:in
block in <top (required)>'
1: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
require': cannot load such file -- /var/lib/gems/2.7.0/gems/dory-1.1.1/lib/dory/config (LoadError)
I am using Ubuntu 20.04 and installed this as a gem.
@FreedomBen, could you create a new tag/release from the latest code on master?
I'd like to see the .dev
domain removed from the config and I see it's fixed on master (thanks, @rasben โค๏ธ).
If there is a partial config file present, none of the default settings get used.
hey all dory users, esp @FreedomBen , since we need a reliable local development hub solution, and dory hasn't been updated in ages, i'm thinking of picking it up development-wise (adding the localhost hack as a configurable option, updating the dnsmasq dependency, harmonizing it with the latest docker desktop and m1 macs), unless someone found a better solution.
so -- is there a better solution for what we use dory for (making certain images available under a simple .docker hostname, wildcard proxying, making the images communicate with each other using the same .docker domains on the docker-inside network)? or is there enough interest in keeping dory alive which i'm willing to take over?
This works... but we probably shouldn't use the root user. We may have to change the dory code that looks for the currently logged in user. It's probably safe to depend on useradd.
[Unit]
Description=Dory dns and nginx access to containers
Requires=docker.service
After=docker.service
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/root
ExecStart=/usr/local/bin/dory up
ExecStop=/usr/local/bin/dory down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Hi,
We have a problem here when compared to dinghy: whereas in a virtualbox/docker-machine/dinghy configuration, services in separate containers are able to access each other just by specifying VIRTUAL_HOST, in a Docker for Mac/dory setup I have to additionally specify explicit links between each other, with external_links, like:
hub:
external_links:
- dory_dinghy_http_proxy:firefox.docker
- dory_dinghy_http_proxy:testrunner.docker
For some reason the default seems to be a restrictive proxying policy. Is this a bug? Is there an option to set this?
Thanks!
I'd like a way for dory to be able to co-exist with puma-dev ..
They both seem to want to take over 0.0.0.0:80/443 which doesn't end well ..
Dory does a great job for domains in docker environments, and puma-dev does a great job with local .. heck they don't even conflict in DNS .. but once you get to the actual proxy service it breaks down .. since they both have a proxy that listens on port 80/443 ..
perhaps if dory could have a fallback port (which is expected to be another proxy)
Thoughts?
I'm trying to transition from Dinghy to Docker for Mac & Dory, but I'm having an issue with DNS not resolving.
macOS: 10.14.4
Docker: 18.09.3, build 774a1f4
Ruby: 2.3.7p456
Dory: 1.0.3
Dory reports that the DNS service is running, and I can see something listening on 127.0.0.1:53 on my Mac. However, I can't resolve any *.docker hostnames. For example, running a plain nginx container, I can access it on localhost, but not on a .docker hostname:
$ docker run -d -e VIRTUAL_HOST=nginx.docker -p 8080:80 nginx:latest
$ curl http://localhost:8080
... returns nginx page ...
$ curl http://nginx.docker
... hangs ...
$ dig @127.0.0.1 nginx.docker
; <<>> DiG 9.10.6 <<>> @127.0.0.1 nginx.docker
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
$ dig @$(dory ip dns) nginx.docker
; <<>> DiG 9.10.6 <<>> @172.17.0.3 nginx.docker
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
$ cat /etc/resolver/docker
# added by dory
nameserver 127.0.0.1
port 53
I installed tcpdump
on the dory_dnsmasq
container, and I can see it receiving UDP packets when I try to do a dig @127.0.0.1 nginx.docker
:
tcpdump -i eth0 udp port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
20:41:34.024636 IP 172.17.0.1.54947 > 437d613413fa.53: 43917+ [1au] A? nginx.docker. (41)
20:41:34.024751 IP 437d613413fa.53 > 172.17.0.1.54947: 43917*$ 1/0/0 A 127.0.0.1 (46)
20:41:34.024868 IP 437d613413fa.42445 > 192.168.65.1.53: 63392+ PTR? 1.0.17.172.in-addr.arpa. (41)
20:41:34.025668 IP 192.168.65.1.53 > 437d613413fa.42445: 63392 NXDomain 0/0/0 (41)
20:41:34.026201 IP 437d613413fa.41651 > 192.168.65.1.53: 36631+ PTR? 1.65.168.192.in-addr.arpa. (43)
20:41:34.026934 IP 192.168.65.1.53 > 437d613413fa.41651: 36631 NXDomain 0/0/0 (43)
20:41:39.029900 IP 172.17.0.1.54947 > 437d613413fa.53: 43917+ [1au] A? nginx.docker. (41)
20:41:39.030022 IP 437d613413fa.53 > 172.17.0.1.54947: 43917*$ 1/0/0 A 127.0.0.1 (46)
20:41:44.035306 IP 172.17.0.1.54947 > 437d613413fa.53: 43917+ [1au] A? nginx.docker. (41)
20:41:44.035476 IP 437d613413fa.53 > 172.17.0.1.54947: 43917*$ 1/0/0 A 127.0.0.1 (46)
^C
10 packets captured
10 packets received by filter
0 packets dropped by kernel
scutil --dns
shows the resolvers for .docker and .dev:
$ scutil --dns
DNS configuration
resolver #1
search domain[0] : my.dhcp.domain
nameserver[0] : xxx.xxx.xxx.xxx
nameserver[1] : yyy.yyy.yyy.yyy
if_index : 8 (en0)
flags : Request A records
reach : 0x00000002 (Reachable)
resolver #2
domain : local
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300000
resolver #3
domain : 254.169.in-addr.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300200
resolver #4
domain : 8.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300400
resolver #5
domain : 9.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300600
resolver #6
domain : a.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 300800
resolver #7
domain : b.e.f.ip6.arpa
options : mdns
timeout : 5
flags : Request A records
reach : 0x00000000 (Not Reachable)
order : 301000
resolver #8
domain : docker
nameserver[0] : 127.0.0.1
port : 53
flags : Request A records, Request AAAA records
reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address)
resolver #9
domain : dev
nameserver[0] : 127.0.0.1
port : 53
flags : Request A records, Request AAAA records
reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address)
DNS configuration (for scoped queries)
resolver #1
search domain[0] : my.dhcp.domain
nameserver[0] : xxx.xxx.xxx.xxx
nameserver[1] : yyy.yyy.yyy.yyy
if_index : 8 (en0)
flags : Scoped, Request A records
reach : 0x00000002 (Reachable)
resolver #2
search domain[0] : my.dhcp.domain
nameserver[0] : xxx.xxx.xxx.xxx
nameserver[1] : yyy.yyy.yyy.yyy
if_index : 5 (en1)
flags : Scoped, Request A records
reach : 0x00000002 (Reachable)
@FreedomBen I am wondering if you could help me figure out my issue.
I am trying to install a development version of Canvas LMS using this Quick Start Guide.
Input:
./script/docker_dev_setup.sh
The first time I ran it, I had the following output:
|\ ____\|\ __ \|\ ___ \|\ \ / /|\ __ \|\ ____\
\ \ \___|\ \ \|\ \ \ \\ \ \ \ \ / / | \ \|\ \ \ \___|_
\ \ \ \ \ __ \ \ \\ \ \ \ \/ / / \ \ __ \ \_____ \
\ \ \____\ \ \ \ \ \ \\ \ \ \ / / \ \ \ \ \|____|\ \
\ \_______\ \__\ \__\ \__\\ \__\ \__/ / \ \__\ \__\____\_\ \
\|_______|\|__|\|__|\|__| \|__|\|__|/ \|__|\|__|\_________\
\|_________|
Welcome! This script will guide you through the process of setting up a
Canvas development environment.
Log file is /home/mike/canvas-lms/log/docker_dev_setup.log
> It looks like you're using Linux. Let's set that up.
> Checking Dependencies...
script/common/utils/common.sh: line 159: ((: 0
0
0
0 : syntax error in expression (error token is "0
0
0 ")
Canvas recommends using dory for a reverse proxy allowing you to
access canvas at http://canvas.docker. Detailed instructions
are available at https://github.com/FreedomBen/dory.
If you want to install it, run 'gem install dory' then rerun this script.
Would you like to skip dory? [y/n] n
Install dory then rerun this script.
So, I stalled dory and ran the script again.
Input:
./script/docker_dev_setup.sh
Output after installing dory:
________ ________ ________ ___ ___ ________ ________
|\ ____\|\ __ \|\ ___ \|\ \ / /|\ __ \|\ ____\
\ \ \___|\ \ \|\ \ \ \\ \ \ \ \ / / | \ \|\ \ \ \___|_
\ \ \ \ \ __ \ \ \\ \ \ \ \/ / / \ \ __ \ \_____ \
\ \ \____\ \ \ \ \ \ \\ \ \ \ / / \ \ \ \ \|____|\ \
\ \_______\ \__\ \__\ \__\\ \__\ \__/ / \ \__\ \__\____\_\ \
\|_______|\|__|\|__|\|__| \|__|\|__|/ \|__|\|__|\_________\
\|_________|
Welcome! This script will guide you through the process of setting up a
Canvas development environment.
Log file is /home/mike/canvas-lms/log/docker_dev_setup.log
> It looks like you're using Linux. Let's set that up.
> Checking Dependencies...
script/common/utils/common.sh: line 159: ((: 0
0
0
0 : syntax error in expression (error token is "0
0
0 ")
> Starting dory...
/usr/local/bin/dory:25:in `load': cannot load such file -- /var/lib/gems/3.0.0/gems/dory-1.2.0/bin/dory (LoadError)
from /usr/local/bin/dory:25:in `<main>'
/usr/local/bin/dory:25:in `load': cannot load such file -- /var/lib/gems/3.0.0/gems/dory-1.2.0/bin/dory (LoadError)
from /usr/local/bin/dory:25:in `<main>'
> Something went wrong with dory! Exiting script.
/o\ Something went wrong. Check /home/mike/canvas-lms/log/docker_dev_setup.log for details.
I am wondering if you have any ideas. I keep running into a wall, so I thought you would be the person who could help.
Running on a Pi 4, 4GB. Ubuntu 20.04, ARM64.
Hi again,
I completely lost so I'm quickly posting to tell what's what's but I might be too much concise.
I'm testing dory on Linux Mint 18.1 Serena
as you now know. I have no container (before running any test obviously) running except for portainer and dory:
The first strange thing is that the domain name doesn't really matter.
i.e.: docker run -it -e VIRTUAL_HOST=s -e VIRTUAL_PORT=8000 crccheck/hello-world
can be accessed via http://fgsdg.docker/
or anything ending with .docker
.
I suppose it is not exactly the desired behavior (or is it?).
The second problem is that only DN ending by .docker
are accessible from the browser. If another server has another custom fancy DN, it's inaccessible (the first launched gets the response) because of that.
So to access it, you have to specify a "correct" DN ending with .docker
.
Sooooo, is my Mint a hater to dory? I have no background in ruby and very little in DevOps/networking so I'm afraid I can't quite help but to report. :/
And again, I hope it helped. :)
EDIT: I forgot to put version of ruby and dory so here it is
โ ~ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
โ ~ dory -v
/var/lib/gems/2.3.0/gems/dory-0.6.2/lib/dory/version.rb:2: warning: already initialized constant Dory::VERSION
/var/lib/gems/2.3.0/gems/dory-0.6.3/lib/dory/version.rb:2: warning: previous definition of VERSION was here
/var/lib/gems/2.3.0/gems/dory-0.6.2/lib/dory/version.rb:3: warning: already initialized constant Dory::DATE
/var/lib/gems/2.3.0/gems/dory-0.6.3/lib/dory/version.rb:3: warning: previous definition of DATE was here
Dory - Version: 0.6.2
I must say I didn't see those warnings but I'm pretty sure it has nothing to do with my problem.
Hello,
Been using dory for a number of years on OSX. Just upgraded to the M1 chip and Big Sur. When I install dory using gem install dory
and then I run dory
. I get the following error:
โฐโโค ./dory
Traceback (most recent call last):
2: from ./dory:7:in `<main>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dory (LoadError)
8: from ./dory:7:in `<main>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
4: from /Library/Ruby/Gems/2.6.0/gems/dory-1.1.1/lib/dory.rb:1:in `<top (required)>'
3: from /Library/Ruby/Gems/2.6.0/gems/dory-1.1.1/lib/dory.rb:1:in `each'
2: from /Library/Ruby/Gems/2.6.0/gems/dory-1.1.1/lib/dory.rb:2:in `block in <top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- /Library/Ruby/Gems/2.6.0/gems/dory-1.1.1/lib/dory/config (LoadError)
Any ideas?
Thank You,
Larry
On ubuntu 20.04 and popos 21.10 dory cannot change/resolve the /etc/resolv/conf. See below.
If you edit this file manually and remove the comments that are present in the file it does work.
bash: line 20: nameserver: command not found
bash: line 21: nameserver: command not found
bash: line 22: options: command not found
bash: -c: line 23: unexpected EOF while looking for matching `''
bash: -c: line 24: syntax error: unexpected end of file
Error configuring local resolver ```
I know there is dinghy http proxy for OSX but I can't help to think that Dory can be used universally for both OSX AND Ubuntu (or perhaps even Windows one day).
Is this something you could probably put in ?
Thanks!
Running Docker Community edge
Version 17.11.0-ce-mac40 (20561)
Channel: edge
d8fd0f1f4a
on macOS 10.13.1 Beta (17B35a)
After a short period of time I have to do dory down && dory up
to get routing going back to my docker containers. It's super weird, random and annoying :-)
I know this isn't a ton of details but I can dig up more.
Hi,
Apparently dnsmasq is used as part of the network manager in Mint. I don't know what to do with that knowledge but I found the answer while posting the issue and thought you may be interested in at least documenting it.
You may add a script to automate the "problem" resolution such as:
sudo sed -i 's/^dns=dnsmasq/#&/' /etc/NetworkManager/NetworkManager.conf \
&& sudo service network-manager restart \
&& sudo service networking restart
I'm not sure it is the best solution but so far I got no trouble (even a connectivity improvement?) except that it doesn't necessarily reconnect correctly (apparently?).
I hope that was helpful,
cheers,
Hello!
I'm having a small problem while using certificates and dory. It seems to fail proxying to the container when I set a certificate directory with ssl_certs_dir
in the .dory.yml
file.
These logs I get when booting up the dory_dinghy_http_proxy
with a certs directory set
forego | starting nginx.1 on port 5000
forego | starting dockergen.1 on port 5100
dockergen.1 | 2016/10/25 01:19:07 Generated '/etc/nginx/conf.d/default.conf' from 4 containers
dockergen.1 | 2016/10/25 01:19:07 Running '/app/reload-nginx'
dockergen.1 | 2016/10/25 01:19:08 Error running notify command: /app/reload-nginx, exit status 1
dockergen.1 | 2016/10/25 01:19:08 Watching docker events
dockergen.1 | 2016/10/25 01:19:09 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification '/app/reload-nginx'
dockergen.1 | 2016/10/25 01:19:09 Received event start for container 4a6e829a53e2
dockergen.1 | 2016/10/25 01:19:09 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification '/app/reload-nginx'
nginx.1 | 2016/10/25 01:19:16 [error] 24#24: *1 open() "/usr/share/nginx/html/home/capabilities" failed (2: No such file or directory), client: 172.17.0.1, server: localhost, request: "GET /home/capabilities HTTP/1.1", host: "omnifilm.docker"
nginx.1 | 172.17.0.1 - - [25/Oct/2016:01:19:16 +0000] "GET /home/capabilities HTTP/1.1" 404 571 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36" "-"
I'm wondering if maybe it doesn't use the name matching engine that the dinghy_http_proxy
does.
At any rate I made a very short screencast that shows my problem using dory
Let me know if you have any ideas,
Thanks.
Dory suffers from a problem that the dinghy http proxy has fixed.
# Apply fix for very long server names
server_names_hash_bucket_size 128;
Otherwise if try to set longer hostnames you just get the default nginx template.
Speaking of your forked image, is there any reason to keep it round because the dinghy image does support SSL.
When working with different apps on local it would be nice to be able to set / configure CORS headers to be set for the nginx proxy.
In production for modern cloud apps the CORS headers can be dealt with on deployment configuration level, e.g. with Istio. With CORS headers set via the nginx proxy inside dory this would basically be the same behaviour.
I could not find an option inside /lib/dory/config.rb. Hence I am making this feature request and hope it is a no-brainer and that other people find that option usefull, too.
This is on macOS 10.14.3
ruby -v
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18]
dory -v
Dory - Version: 1.0.3
version: "2"
services:
redis:
image: redis
environment:
VIRTUAL_HOST: redis.docker
VIRTUAL_PORT: 6379
crccheck:
image: crccheck/hello-world
environment:
VIRTUAL_HOST: hello.docker
VIRTUAL_PORT: 8000
Trying out a Redis and hello-world container, but running into issues, Redis-cli will refuse to connect:
redis-cli -h redis.docker ping
Could not connect to Redis at redis.docker:6379: Connection refused
while all *.docker respond to the curl of hello-world:
I've been trying to configure some Let's Encrypt certbot generated certificates into a Dory "cluster". But simply adding anything to "ssl_certs_dir" break the whole canvas deployment.
Debugging efforts haven't yielded much of use. The proxy container runs, everything looks fine. The virtual hosts in the nginx.conf of the proxy container don't match with the certificate, but I set thouse on dory.yml, nothing changed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.