[PR #195] [CLOSED] Add config/environment/cli options to configure docker socket URL #331

Closed
opened 2026-02-26 04:34:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mageddo/dns-proxy-server/pull/195
Author: @imartinezortiz
Created: 5/4/2020
Status: Closed

Base: masterHead: dps-docker-host-options


📝 Commits (7)

  • 282c266 Upgrade golang to 1.14.2
  • f0907f1 convert project to go native modules
  • df8053d Fixing testing issue upgrading go >= 1.13.
  • 57bbd45 Updating docker cli / types dependencies
  • 054b8a1 Add DockerHost and DockerApiVersion configuration options
  • e58f758 Adding a docker-compose.yml example using tecnativa docker socket proxy
  • 89d6309 If MG_DOCKER_HOST it is used, resolve hostname if needed to avoid chicken-and-egg problem

📊 Changes

415 files changed (+34886 additions, -127207 deletions)

View changed files

📝 Dockerfile (+3 -2)
📝 Dockerfile.builder (+1 -1)
📝 Dockerfile.go.builder (+1 -1)
📝 conf/conf.go (+20 -0)
📝 conf/conf_test.go (+25 -0)
📝 dns.go (+11 -0)
📝 docker/dockernetwork/dockernetwork.go (+5 -5)
📝 docker/dockernetwork/dockernetwork_mock.go (+3 -3)
📝 docker/dockernetwork/dockernetwork_test.go (+2 -2)
📝 docs/content/3-configuration/_index.en.md (+17 -9)
📝 events/docker/docker.go (+33 -36)
📝 events/docker/docker_test.go (+3 -3)
📝 events/local/localvo/localvo.go (+3 -0)
📝 events/local/storagev2/storagev2.go (+7 -0)
examples/using-docker-socket-proxy/docker-compose.yml (+50 -0)
📝 flags/flags.go (+2 -15)
go.mod (+23 -0)
go.sum (+54 -0)
overlay/usr/bin/docker-entrypoint (+19 -0)
📝 utils/env/env.go (+3 -0)

...and 80 more files

📄 Description

The main objective of this PR is to add a couple configuration options to specify the URL to connect to the docker daemon and to specify the docker API version to use. The idea is to use tecnativa/docker-socket-proxy to restrict and control the access of DPS to the docker demon.

I also created some tests, updated the documentation and provided an example docker compose that shows how to use the new feature.

Besides the PR also does:

  • Update DPS to use go 1.14
  • Migrate DPS govendor modules to go native modules
  • Migrate the deprecated docker cli / types dependencies to use the current ones.

If you prefer / think that these additional changes require a separate PR let me know.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mageddo/dns-proxy-server/pull/195 **Author:** [@imartinezortiz](https://github.com/imartinezortiz) **Created:** 5/4/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dps-docker-host-options` --- ### 📝 Commits (7) - [`282c266`](https://github.com/mageddo/dns-proxy-server/commit/282c266b46dd09f565eea71b838cef9ddaa10721) Upgrade golang to 1.14.2 - [`f0907f1`](https://github.com/mageddo/dns-proxy-server/commit/f0907f17e2ac5a2ac981e9394ba14d2c90ccc08c) convert project to go native modules - [`df8053d`](https://github.com/mageddo/dns-proxy-server/commit/df8053d28e09165aa9cc7d15d231c4609894d6b1) Fixing testing issue upgrading go >= 1.13. - [`57bbd45`](https://github.com/mageddo/dns-proxy-server/commit/57bbd4531252560bcb2f54019b6ebdd91d4fc229) Updating docker cli / types dependencies - [`054b8a1`](https://github.com/mageddo/dns-proxy-server/commit/054b8a15c59489f9658c9a525e955137449a3a70) Add DockerHost and DockerApiVersion configuration options - [`e58f758`](https://github.com/mageddo/dns-proxy-server/commit/e58f758ed45741bd07b80812698d2f626aec753f) Adding a docker-compose.yml example using tecnativa docker socket proxy - [`89d6309`](https://github.com/mageddo/dns-proxy-server/commit/89d6309685ba7f1764e5ec30603844d0149bdea7) If MG_DOCKER_HOST it is used, resolve hostname if needed to avoid chicken-and-egg problem ### 📊 Changes **415 files changed** (+34886 additions, -127207 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+3 -2) 📝 `Dockerfile.builder` (+1 -1) 📝 `Dockerfile.go.builder` (+1 -1) 📝 `conf/conf.go` (+20 -0) 📝 `conf/conf_test.go` (+25 -0) 📝 `dns.go` (+11 -0) 📝 `docker/dockernetwork/dockernetwork.go` (+5 -5) 📝 `docker/dockernetwork/dockernetwork_mock.go` (+3 -3) 📝 `docker/dockernetwork/dockernetwork_test.go` (+2 -2) 📝 `docs/content/3-configuration/_index.en.md` (+17 -9) 📝 `events/docker/docker.go` (+33 -36) 📝 `events/docker/docker_test.go` (+3 -3) 📝 `events/local/localvo/localvo.go` (+3 -0) 📝 `events/local/storagev2/storagev2.go` (+7 -0) ➕ `examples/using-docker-socket-proxy/docker-compose.yml` (+50 -0) 📝 `flags/flags.go` (+2 -15) ➕ `go.mod` (+23 -0) ➕ `go.sum` (+54 -0) ➕ `overlay/usr/bin/docker-entrypoint` (+19 -0) 📝 `utils/env/env.go` (+3 -0) _...and 80 more files_ </details> ### 📄 Description The main objective of this PR is to add a couple configuration options to specify the URL to connect to the docker daemon and to specify the docker API version to use. The idea is to use [tecnativa/docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy) to restrict and control the access of DPS to the docker demon. I also created some tests, updated the documentation and provided an example docker compose that shows how to use the new feature. Besides the PR also does: - [X] Update DPS to use go 1.14 - [X] Migrate DPS govendor modules to go native modules - [X] Migrate the deprecated docker cli / types dependencies to use the current ones. If you prefer / think that these additional changes require a separate PR let me know. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 04:34:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#331
No description provided.