All Projects → bamarni → dockness

bamarni / dockness

Licence: other
DNS for Docker machines

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to dockness

Image Builder Rpi
SD card image for Raspberry Pi with Docker: HypriotOS
Stars: ✭ 973 (+2761.76%)
Mutual labels:  docker-machine
Babun Docker
Use Docker Toolbox with Babun (Cygwin) in Windows
Stars: ✭ 173 (+408.82%)
Mutual labels:  docker-machine
SmartGW
Domain based VPN Gateway/Proxy for all devices
Stars: ✭ 49 (+44.12%)
Mutual labels:  dns-server
Docker Swarm
🐳🐳🐳 This repository is part of a blog series on Docker Swarm example using VirtualBox, OVH Openstack, Azure and Amazon Web Services AWS
Stars: ✭ 43 (+26.47%)
Mutual labels:  docker-machine
Docker Machine Driver Vmware
Docker machine driver for VMware Fusion and Workstation.
Stars: ✭ 114 (+235.29%)
Mutual labels:  docker-machine
Docker Sqs Local
Docker image to run Amazon Simple Queue Service (Amazon SQS) locally.
Stars: ✭ 193 (+467.65%)
Mutual labels:  docker-machine
Docker Machine Driver Xhyve
docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
Stars: ✭ 879 (+2485.29%)
Mutual labels:  docker-machine
mydpdkdns
dns server with high performance, based on dpdk.
Stars: ✭ 41 (+20.59%)
Mutual labels:  dns-server
Docker Swarm Tutorial
Docker Swarm 基本教學 - 從無到有 Docker-Swarm-Beginners-Guide📝
Stars: ✭ 148 (+335.29%)
Mutual labels:  docker-machine
Docker Machine Driver Scaleway
🐳 Scaleway driver for Docker Machine
Stars: ✭ 249 (+632.35%)
Mutual labels:  docker-machine
Docker For All
Docker applied in development, devops, testing, product management etc.
Stars: ✭ 88 (+158.82%)
Mutual labels:  docker-machine
Docker Machine Port Forwarder
Simple bash script that makes it easier to forward ports from Docker Machine
Stars: ✭ 107 (+214.71%)
Mutual labels:  docker-machine
Spring Microservice Sample
Spring Boot based Mircoservice sample
Stars: ✭ 199 (+485.29%)
Mutual labels:  docker-machine
Hetzner Gitlab Runner
Autoscale gitlab ci runners on hetzner cloud
Stars: ✭ 36 (+5.88%)
Mutual labels:  docker-machine
docker-roj
Portable environments for Docker swarms and stacks
Stars: ✭ 31 (-8.82%)
Mutual labels:  docker-machine
Docker Machine Zsh Completion
A more functional and up-to-date zsh completion for docker-machine
Stars: ✭ 14 (-58.82%)
Mutual labels:  docker-machine
Docker Machine Vultr
Ⓜ️ Docker Machine driver for Vultr Cloud
Stars: ✭ 185 (+444.12%)
Mutual labels:  docker-machine
dcompass
A high-performance programmable DNS component aiming at robustness, speed, and flexibility
Stars: ✭ 260 (+664.71%)
Mutual labels:  dns-server
ethereum-testnet-docker
基于docker的以太坊集群的开发环境
Stars: ✭ 19 (-44.12%)
Mutual labels:  docker-machine
Fluentdocker
Commands, Services and Fluent API for docker, docker-compose & docker-machine, for win/mac/linux and native docker in c#
Stars: ✭ 245 (+620.59%)
Mutual labels:  docker-machine

dockness Build Status

DNS for Docker machines, allows to access them with the following domain format : {machine}.docker.

How it works

It spins up a simplistic DNS server, only listening for questions about A records.

Behind the scene it will use libmachine in order to resolve IP addresses.

Installation

Prebuilt binaries

Prebuilt binaries are available in the releases.

From source (requires Go)

go get github.com/bamarni/dockness

With Homebrew (Mac OS X)

brew tap mkw/homebrew-mkw
brew install dockness

Usage

dockness [options...]

Options:
  -tld    Top-level domain to use (defaults to "docker")
  -ttl    Time to Live for DNS records (defaults to 0)
  -port   Port to listen on (defaults to "53")
  -debug  Enable debugging (defaults to false)

Mac OSX

To develop on Mac you probably have a local VM, using VirtualBox for example. However this machine gets assigned a dynamic IP address.

You can be up and running in a few commands, first :

> echo -e "nameserver 127.0.0.1\nport 10053" | sudo tee /etc/resolver/docker

It tells your Mac that the resolver for .docker TLD listens locally on port 10053. You can now run the resolver on this port :

> dockness -port 10053
2016/02/18 10:39:52 Listening on :10053...

Linux

Even though Linux users might not need a development VM, it can be useful for remote machines (eg. ssh staging2.docker, ...).

Here and unlike Mac OSX, there is no quick trick to make it work out of the box. Linux distributions come with more advanced DNS management where manually tweaking resolv.conf is usually not an option.

What should work in most cases is to use Dnsmasq, which provides a lightweight DNS server.

If you have it installed, you can run :

> dockness -port 10053
2016/02/18 10:40:43 Listening on :10053...

Then let Dnsmasq know about the resolver by running those commands :

> echo "server=/docker/127.0.0.1#10053" | sudo tee -a /etc/dnsmasq.conf
> sudo /etc/init.d/dnsmasq restart

Configure dockness as a service

As it's not very convenient to run the program manually in a terminal, you can instead set it as a service. Doing so, it will be running in the background automatically when booting your computer.

Mac OSX

You can create the appropriate service configuration file at ~/Library/LaunchAgents/local.dockness.plist :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Disabled</key>
        <false/>
        <key>Label</key>
        <string>local.dockness</string>
        <key>ProgramArguments</key>
        <array>
                <string>/path/to/dockness</string>
                <string>-port</string>
                <string>10053</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>

Finally, the service can be enabled :

launchctl load ~/Library/LaunchAgents/local.dockness.plist

Linux

Here again, it will depend on your Linux distribution. We'll take as example Systemd, which is nowadays the default init system in most distributions.

Create the following file at /etc/systemd/system/dockness.service:

[Unit]
Description=Dockness
After=network.target

[Service]
ExecStart=/path/to/dockness -port 10053

[Install]
WantedBy=multi-user.target
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].