Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
systemd-resolved-docker
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
flaktack
systemd-resolved-docker
Commits
8847dcc7
Commit
8847dcc7
authored
3 years ago
by
Zsombor Welker
Browse files
Options
Downloads
Patches
Plain Diff
Add support for wildcard domains
parent
daf285f4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+4
-0
4 additions, 0 deletions
README.md
src/systemd_resolved_docker/dockerdnsconnector.py
+1
-1
1 addition, 1 deletion
src/systemd_resolved_docker/dockerdnsconnector.py
with
5 additions
and
1 deletion
README.md
+
4
−
0
View file @
8847dcc7
...
@@ -39,6 +39,10 @@ an exact match is required. If a generated domain address doesn't match the list
...
@@ -39,6 +39,10 @@ an exact match is required. If a generated domain address doesn't match the list
```
sh
```
sh
docker run
--rm
-it
--hostname
some-host alpine
# some-host
docker run
--rm
-it
--hostname
some-host alpine
# some-host
```
```
Glob matching is supported in the
`--hostname`
, with which wildcard domains are supported:
```
sh
docker run
--hostname
'*.test'
--rm
-it
alpine
# anything.test
```
If an explicit
`--domainname`
is provided then that may also be used:
If an explicit
`--domainname`
is provided then that may also be used:
```
sh
```
sh
docker run
--rm
-it
--hostname
test
--domainname
mydomain alpine
# test.mydomain.docker
docker run
--rm
-it
--hostname
test
--domainname
mydomain alpine
# test.mydomain.docker
...
...
This diff is collapsed.
Click to expand it.
src/systemd_resolved_docker/dockerdnsconnector.py
+
1
−
1
View file @
8847dcc7
...
@@ -23,7 +23,7 @@ class DockerDNSConnector:
...
@@ -23,7 +23,7 @@ class DockerDNSConnector:
self
.
dns_domains_globs
=
[
'
*%s
'
%
domain
if
domain
.
startswith
(
'
.
'
)
else
domain
for
domain
in
dns_domains
]
self
.
dns_domains_globs
=
[
'
*%s
'
%
domain
if
domain
.
startswith
(
'
.
'
)
else
domain
for
domain
in
dns_domains
]
self
.
resolver
=
ZoneResolver
([])
self
.
resolver
=
ZoneResolver
([]
,
glob
=
True
)
self
.
servers
=
[]
self
.
servers
=
[]
resolver
=
InterceptResolver
(
self
.
dns_domains_globs
,
self
.
resolver
,
resolver
=
InterceptResolver
(
self
.
dns_domains_globs
,
self
.
resolver
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment