Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dnsmasq dedicated container #26

Open
wants to merge 1 commit into
base: legacy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ cd containers
docker-compose up -d
```

### With Dnsmasq

To use a Dnsmasq container rather than installing it, start Pontsun with

```sh
cd containers
docker-compose -f docker-compose.yml -f docker-compose.dnsmasq.yml up -d
```

You can also add the following to your `containers/.env` file instead

```dotenv
COMPOSE_FILE=docker-compose.yml:docker-compose.dnsmasq.yml
```

### With SSH agent

#### Linux
Expand Down Expand Up @@ -74,7 +89,7 @@ docker-compose -f docker-compose.yml -f docker-compose.ssh-agent.yml up -d

You can also add the following to your `containers/.env` file instead

```
```dotenv
COMPOSE_FILE=docker-compose.yml:docker-compose.ssh-agent.yml
```

Expand Down
3 changes: 3 additions & 0 deletions containers/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PROJECT_EXTENSION=test
PROJECT_DOMAIN=docker.test

# Used ports for traefik
PONTSUN_DNS_PORT=53
PONTSUN_HTTP_PORT=80
PONTSUN_HTTPS_PORT=443

Expand All @@ -14,6 +15,8 @@ PONTSUN_NETWORK=pontsun

### Images tags

# https://hub.docker.com/r/liip/dnsmasq
DNSMASQ_TAG=1.0.0
# https://hub.docker.com/r/portainer/portainer
PORTAINER_TAG=1.22.1
# https://hub.docker.com/_/traefik
Expand Down
16 changes: 16 additions & 0 deletions containers/docker-compose.dnsmasq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.5'
services:

dnsmasq:
image: liip/dnsmasq:${DNSMASQ_TAG}
container_name: pontsun_dnsmasq
restart: always
environment:
DNSMASQ_DEFAULT_DOMAIN: ${PROJECT_DOMAIN}
logging:
options:
max-size: 20m
ports:
- '${PONTSUN_DNS_PORT}:5353/udp'
networks:
- pontsun
8 changes: 8 additions & 0 deletions docs/installation-for-debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Follow the installation procedure: [https://docs.docker.com/compose/install/](ht

## Dnsmasq

You can either use the Dnsmasq container or install it locally.

### Option A: Container

To use the Dnsmasq container follow the [README instructions](../README.md#with-dnsmasq).

### Option B: Local installation

Dnsmasq will automatically forward any **\*.docker.test** domain to our
local docker infrastructure.

Expand Down
20 changes: 14 additions & 6 deletions docs/installation-for-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ gem install docker-sync
Dnsmasq will automatically forward any **\*.docker.test** domain to our
local docker infrastructure.

You can either use the Dnsmasq container or install it locally.

Either way, you will also need the create the resolver
```
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/docker.test'
```

### Option A: Container

To use the Dnsmasq container follow the [README instructions](../README.md#with-dnsmasq).

### Option B: Local installation

Install Dnsmasq
```
brew install dnsmasq
Expand All @@ -53,12 +67,6 @@ sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchD
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
```

Create resolver
```
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/docker.test'
```

## Trust certificates (to be done AFTER Pontsun install)

### Adding them to the system
Expand Down