You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains a Dockerized DNS-over-HTTPS (DoH) server, built using `dnscrypt/doh-server`. It provides a simple way to run your own DoH resolver.
4
+
5
+
## Table of Contents
6
+
7
+
*[Getting Started](#getting-started)
8
+
*[Building the Docker Image](#building-the-docker-image)
9
+
*[Running the Docker Container](#running-the-docker-container)
10
+
*[Usage](#usage)
11
+
*[GitHub Actions CI/CD](#github-actions-cicd)
12
+
13
+
## Getting Started
14
+
15
+
To run this DoH server, you will need [Docker](https://www.docker.com/get-started/) installed on your system.
16
+
17
+
## Building the Docker Image
18
+
19
+
You can build the Docker image locally using the provided `Dockerfile`:
20
+
21
+
```bash
22
+
docker build -t doh-server:latest .
23
+
```
24
+
25
+
This command will create a Docker image named `doh-server` with the tag `latest`.
26
+
27
+
## Running the Docker Container
28
+
29
+
Once the image is built, you can run the DoH server in a Docker container:
30
+
31
+
```bash
32
+
docker run -d -p 8053:8053 --name doh-server doh-server:latest
33
+
```
34
+
35
+
*`-d`: Runs the container in detached mode (in the background).
36
+
*`-p 8053:8053`: Maps port `8053` on your host machine to port `8053` inside the container. The `doh-server` listens on port `8053` by default.
37
+
*`--name doh-server`: Assigns a name to your container for easier management.
38
+
39
+
## Usage
40
+
41
+
After the container is running, the DoH server will be accessible on `http://localhost:8053`. You can test it using `curl`:
This command queries for `www.example.com` using the DoH server.
48
+
49
+
## GitHub Actions CI/CD
50
+
51
+
This repository includes a GitHub Actions workflow (`.github/workflows/docker-build.yml`) that automatically builds the Docker image whenever changes are pushed to the `main` branch. This ensures that your Docker image is always up-to-date with the latest code.
0 commit comments