Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
blog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
blog
Commits
6c6fadd3
Commit
6c6fadd3
authored
8 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Added post about resovler.
parent
0b14a733
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/resolver.rst
+42
-0
42 additions, 0 deletions
content/resolver.rst
with
42 additions
and
0 deletions
content/resolver.rst
0 → 100644
+
42
−
0
View file @
6c6fadd3
Testing DNS with a clean cache
##############################
:date: 2016-11-01
:summary: Testing DNS with a clean cache
Every so often I make changes to a DNS record, test it, find out it's wrong, fix
it and still get the old response because of caching somewhere along the line.
After it happened to me and a colleague during a launch of a new version of a
website, I decided to address the issue. I wanted a way to test DNS quickly and
easily (preferably locally on command line), for it to be lightweight, doesn't
require changes to my existing setup and doesn't require learning new tools. I
decided to create a Docker image that has its own DNS resolver and each new
container from that image has a clean cache and doesn't depend on other DNS
servers or is affected from their caching.
Usage
-----
To create a new container:
.. code:: shell
docker run -it adarnimrod/resolver
Inside the container you have access to :code:`nslookup`, :code:`dig` and
:code:`mail` for testing purposes. If you need to test new changes,
:code:`exit` the container and create a new one with no cache.
If you want to run just a single command (like getting the MX record for
:code:`shore.co.il`):
.. code:: shell
docker run adarnimrod/resovler dig +short shore.co.il mx
How does it work
----------------
On launch, the container runs and uses its own DNS resolver (in this case NSD).
This way the OS caching or upstream caching interferes with querying and every
new container starts with a clean slate.
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