Git Product home page Git Product logo

dory's Introduction

dory

Gem Version Build Status Code Climate Test Coverage Dependency Status

Dory lets you forget about IP addresses and port numbers while you are developing your application. Through the magic of local DNS and a reverse proxy, you can access your app at the domain of your choosing. For example, http://myapp.docker or http://this-is-a-really-long-name.but-its-cool-cause-i-like-it

Now with support for Docker for Mac and even dinghy! (more info on using with dinghy below)

Dory wraps codekitchen/dinghy-http-proxy and makes it easily available for use outside of dinghy. This way you can work comfortably side by side with your colleagues who run dinghy on macOS.

Specifically, dory will:

  • Fire up the nginx proxy in a daemonized docker container for you
  • Configure and start a local dnsmasq to forward DNS queries for your local domain to the nginx proxy
  • Configure your local DNS resolver to point to the local dnsmasq

Installation

A package for .deb and .rpm is planned as well as a systemd service. If you'd like to help out with any of that, let me know!

Homebrew (recommended on macOS)

brew install dory

Ruby gem (recommended on Linux)

NOTE: Dory requires ruby version 2.2 or greater to be installed on your system already.

If you use multiple versions, your system ruby is too old or you just prefer not to install gems into your system ruby, I recommend installing the ruby version with ruby-install and then managing it with chruby.

gem install dory

Arch Linux (hosted on the quarry repository)

pacman -S ruby-dory

Quick Start

In most cases, the default configuration will be all you need. You literally just set the VIRTUAL_HOST environment variable in your container, install dory and then run:

dory up

If you want to fine-tune, generate a config file with:

dory config-file

and edit away at ~/.dory.yml

Usage

Dory has a small selection of commands that are hopefully intuitive. To customize and fine-tune dory's behavior, it can be configured with a yaml config file.

Commands

Commands:
  dory attach          # Attach to the output of a docker service container
  dory config-file     # Write a default config file
  dory down            # Stop all dory services
  dory help [COMMAND]  # Describe available commands or one specific command
  dory ip              # Grab the IPv4 address of a running dory service
  dory pull            # Pull down the docker images that dory uses
  dory restart         # Stop and restart all dory services
  dory status          # Report status of the dory services
  dory up              # Bring up dory services (nginx-proxy, dnsmasq, resolv)
  dory upgrade         # Upgrade dory to the latest version
  dory version         # Check current installed version of dory

Options:
  v, [--verbose], [--no-verbose]

Config file

Dory will start looking for a config file in your current working directory, and will recurse up to / until it finds one. If dory does not find a config file, it will use the default settings.

You can bootstrap your config file with the default settings using dory config-file. This file will be placed by default at ~/.dory.yml, but again you can move it to a preferred place. This allows you to have project-specific dory configs if you so desire by putting the config at <your-project>/.dory.yml:

---
dory:
  # Be careful if you change the settings of some of
  # these services.  They may not talk to each other
  # if you change IP Addresses.
  # For example, resolv expects a nameserver listening at
  # the specified address.  dnsmasq normally does this,
  # but if you disable dnsmasq, it
  # will make your system look for a name server that
  # doesn't exist.
  dnsmasq:
    enabled: true
    domains:               # array of domains that will be resolved to the specified address
      - domain: docker     # you can set '#' for a wildcard
        address: 127.0.0.1 # return for queries against the domain
    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: kill processes bound to the port we need (see previous setting 'port')
    #   Possible values:
    #     ask (prompt about killing each time. User can accept/reject)
    #     yes|true (go ahead and kill without asking)
    #     no|false (don't kill, and don't even ask)
    kill_others: ask
    service_start_delay: 5  # seconds to wait after restarting systemd services
  nginx_proxy:
    enabled: true
    container_name: dory_dinghy_http_proxy
    https_enabled: true
    ssl_certs_dir: ''  # leave as empty string to use default certs
    port: 80           # port 80 is default for http
    tls_port: 443      # port 443 is default for https

  resolv:
    enabled: true
    nameserver: 127.0.0.1
    port: 53  # port where the nameserver listens. On linux it must be 53

Upgrading existing config file

If you run the dory config-file command and have an existing config file, dory will offer you the option of upgrading. This will preserve your settings and migrate you to the latest format. You can skip the prompt by passing the --upgrade flag

dory config-file --upgrade
Usage:
  dory config-file

Options:
  u, [--upgrade], [--no-upgrade]
  f, [--force]

Description:
  Writes a dory config file to /home/ben/.dory.yml containing the default
  settings. This can then be configured as preferred.

Making your containers accessible by name (DNS)

To make your container(s) accessible through a domain, all you have to do is set a VIRTUAL_HOST environment variable in your container. That's it! (Well, and you have to start dory with dory up)

The proxy will by default use the first port exposed by your container as the HTTP port to proxy to. This can be overridden by setting the VIRTUAL_PORT environment variable on the container to the desired HTTP port.

You will also need to set VIRTUAL_PORT if your server binds to something other than 80 inside its container (e.g. VIRTUAL_PORT: 3000). This will tell the nginx proxy which port to forward traffic to in your container. When accessing the server from outside of docker, you will still hit port 80 (such as with your web browser).

If your back-end container uses HTTPS, then set VIRTUAL_PROTO: https to tell the nginx proxy to use https instead of the default http.

Many people do this in their docker-compose.yml file:

version: '2'
services:
  web:
    build: .
    depends_on:
      - db
      - redis
    environment:
      VIRTUAL_HOST: myapp.docker
  redis:
    image: redis
    environment:
      VIRTUAL_HOST: redis.docker
      VIRTUAL_PORT: 6379
  db:
    image: postgres
    environment:
      VIRTUAL_HOST: postgres.docker
      VIRTUAL_PORT: 5432

In the example above, you can hit the web container from the host machine with http://myapp.docker, and the redis container with tcp://redis.docker. This does not affect any links on the internal docker network.

You could also just run a docker container with the environment variable like this:

docker run -e VIRTUAL_HOST=myapp.docker  ...

Usage with dinghy

If you are using dinghy, but want to use dory to manage the proxy instead of dinghy's built-in stuff, this is now possible! (the use case for this that we ran into was multiple domain support. For example, the dev wanted to have some containers accessible at something.docker). To accomplish this, you need to disable dinghy's proxy stuff (otherwise dinghy and dory will stomp on each other's resolv files):

In your ~/.dinghy/preferences.yml file, disable the proxy:

:preferences:
  :proxy_disabled: true
  ...

In your dory config file (which can be at <your-project>/.dory.yml or anywhere else in parent directories, ~/.dory.yml being the default) (hint: if it doesn't exist, generate it with dory config-file), set your dnsmasq domains and their addresses to dinghy, as well as the resolv nameserver. Here is an example (with unrelated parts removed for ease of reading):

---
dory:
  dnsmasq:
    domains:
      - domain: docker
        address: dinghy # instead of the default 127.0.0.1
    ...
  resolv:
    nameserver: dinghy # instead of the default 127.0.0.1

If the dinghy vm gets rebooted for some reason, or otherwise changes IP addresses, you may need to restart dory to pickup the changes:

dory restart

Root privilege requirement

To configure the local resolver, dory needs to edit the /etc/resolv.conf. Therefore you may be prompted for your sudo password during dory up/restart/down. If you do not want to enter your password every time you can extend the sudoers config as follows:

sudo visudo -f /etc/sudoers.d/dory-edit-resolv-conf

To allow passwordless execution only for a single user (replace my-user accordingly):

Cmnd_Alias DORY_EDIT_RESOLVCONF = /usr/bin/tee /etc/resolv.conf
my-user ALL=(root) NOPASSWD: DORY_EDIT_RESOLVCONF

To allow passwordless execution for all users in group sudo (you can list the affected users with awk -F':' '/sudo/{print $4}' /etc/group):

Cmnd_Alias DORY_EDIT_RESOLVCONF = /usr/bin/tee /etc/resolv.conf
%sudo ALL=(root) NOPASSWD: DORY_EDIT_RESOLVCONF

On OS X you probably need to change %sudo to %admin:

Cmnd_Alias DORY_EDIT_RESOLVCONF = /usr/bin/tee /etc/resolv.conf
%admin ALL=(root) NOPASSWD: DORY_EDIT_RESOLVCONF

Note: Changes are only applied after closing the file.

Troubleshooting

Help the dnsmasq container is having issues starting!

Make sure you aren't already running a dnsmasq service (or some other service) on port 53. Because the Linux resolv file doesn't have support for port numbers, we have to run on host port 53. To make matters fun, some distros (such as those shipping with NetworkManager) will run a dnsmasq on 53 to perform local DNS caching. This is nice, but it will conflict with Dory's dnsmasq container. You will probably want to disable it.

If using Network Manager, try commenting out dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf. Then restart NetworkManager: sudo service network-manager restart or sudo systemctl restart NetworkManager

If you're using Network Manager/DNSMasqd to do NAT and/or share internet with the computer you are installing dory on, stop. You'd need to configure dory's built in DNSmasq to do the same, which is not trivial, out of scope, and probably more than you're bargaining for.

If you are on Mac, you can choose which port to bind the dnsmasq container to. In your dory config file, adjust the setting under dory -> dnsmasq -> port. You probably want to make dory -> resolv -> port match. The default value on Mac is 19323.

As of version 0.5.0, dory is a little smarter at handling this problem for you. dory will identify if you have systemd services running that will race for the port and cause issues. It will offer to put those services down temporarily and then put them back up when finished. You can configure this behavior in the config file to achieve minimal annoyance (since you'll likely be prompted every time by default).

Is this dinghy for Linux?

No. Well, maybe sort of, but not really. Dinghy has a lot of responsibilities on OS X, most of which are not necessary on Linux since docker runs natively. Something it does that can benefit linux users however, is the setup and management of an nginx reverse HTTP proxy. For this reason, dory exists to provide this reverse proxy on Linux, along with accompanying dnsmasq and resolv services. Using full dinghy on Linux for local development doesn't really make sense to me, but using a reverse proxy does. Furthermore, if you work with other devs who run Dinghy on OS X, you will have to massage your docker-compose files to avoid conflicting. By using dory, you can safely use the same VIRTUAL_HOST setup without conflict. And because dory uses dinghy-http-proxy under the hood, you will be as compatible as possible.

Are there any reasons to run full dinghy on Linux?

Generally speaking, IMHO, no. The native experience is superior. However, for some reason maybe you'd prefer to not have docker on your local machine? Maybe you'd rather run it in a VM? If that describes you, then maybe you want full dinghy.

I am intrigued at the possibilities of using dinghy on Linux to drive a cloud-based docker engine. For that, stay tuned.

Why didn't you just fork dinghy?

That was actually my first approach, and I considered it quite a bit. As I went through the process in my head tho, and reviewed the dinghy source code, I decided that it was just too heavy to really fit the need I had. I love being able to run docker natively, and I revere the Arch Way. Dinghy just seemed like too big of a hammer for this problem (the problem being that I work on Linux, but my colleagues use OS X/Dinghy for docker development).

What if I'm developing on a cloud server?

You do this too!? Well fine hacker, it's your lucky day because dory has you covered. You can run the nginx proxy on the cloud server and the dnsmasq/resolver locally. Here's how:

  • Install dory on both client and server:
gem install dory
  • Gen a base config file:
dory config-file
  • On the local machine, disable the nginx-proxy, and set the dnsmasq address to that of your cloud server:
  dnsmasq:
    enabled: true
    domain: docker      # domain that will be listened for
    address: <cloud-server-ip>  # address returned for queries against domain
    container_name: dory_dnsmasq
  nginx_proxy:
    enabled: false
    container_name: dory_dinghy_http_proxy
  • On the server, disable resolv and dnsmasq:
  dnsmasq:
    enabled: false
    domain: docker      # domain that will be listened for
    address: 127.0.0.1  # address returned for queries against domain
    container_name: dory_dnsmasq
  resolv:
    enabled: false
    nameserver: 127.0.0.1
  • Profit!

Contributing

Want to contribute? Cool! Fork it, push it, request it. Please try to write tests for any functionality you add.

Development Quick Start

  1. If you want to send a pull request with your changes, then fork the repo
  2. Clone it: git clone https://github.com/FreedomBen/dory.git or if you forked in step 1, use the URL for your fork
  3. Make your changes
  4. Build the gem locally: gem build dory.gemspec
  5. Now you can run your locally built version of the gem like normal: dory <somecommand>
  6. Rinse and repeat. For easy cleaning and reinstalling, I recommend using this command, which you might want to alias: rm *.gem; gem clean dory; yes | gem uninstall dory; gem build dory.gemspec && gem install dory*.gem
  7. Run the specs locally (note that I've attempted to make the specs interfere with the running system as minimally as possible, but some things are difficult to avoid. For example, if you have something running on port 53, the specs will kill it. Also, you will need to enter password for sudo): bundle exec rspec spec/
  8. Specific specs can be run with: bundle exec rspec spec/some/file.rb

Built on:

dory's People

Contributors

cclauss avatar danquah avatar dependabot[bot] avatar djbender avatar fossprime avatar freedomben avatar gagalago avatar lucachaco avatar rasben avatar ryansch avatar stigkj avatar stuartf avatar tbal avatar tripox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dory's Issues

[Feature Request] Add support for xip.io hostnames

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$;
}

Invalid byte sequence in US-ASCII (ArgumentError)

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:in running?': 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:in exec_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:in run' 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:in dispatch' 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

[Question] Custom xip.io -like setup

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 ?

Resolv is written too fast after re-upping NetworkManager

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.

Docker for Mac 4.1.1 accessing the proxy server from within a container hangs

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:

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.

archlinux cannot load config file

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?

Have to restart every few minutes

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.

Let's Encypt certificates break router?

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.

Server names hash bucket size.

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.

Installing Canvas using ./script/docker_dev_setup.sh but having an issue with dory

@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.

Custom Certificates Seem to Break Proxy.

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

http://quick.as/8br7coyej

Let me know if you have any ideas,
Thanks.

Co-Existing with puma-dev

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?

Linux, Homebrew formula [Help needed]

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.

Question: Connect back to host machine from within a docker container

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

Dory seems broken on Mint

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:
dory status

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.

Linux Mint network manager prevents dory to launch

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,

Apple M1 / Big Sur

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

Dory seems to be trying to access the wrong service

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
dory and the project
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)

[Enhancement] Systemd support

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

what to do about dinghy-http-proxy

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.

Docs, how to uninstall ;(

... 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

Solution

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.

Dory for OSX?

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!

Paswordless add resolver

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

Dory cannot configure resolv.conf

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  ```

Add Ruby version required to README

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.

(question) Can't connect to non-http services

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?

DNS not working on macOS

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)

[Enhancement] configure CORS headers

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.

[strategy] reviving this or alternatives?

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?

Containers accessing each other

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!

Issues with setting up resolv on Kubuntu 17.04

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 😞

`require': cannot load such file -- /var/lib/gems/2.7.0/gems/dory-1.1.1/lib/dory/config (LoadError)

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.

can't seem to connect

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:

  • hello.docker
  • anything.docker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.