merasabkuch commited on
Commit
bdb4179
1 Parent(s): d8576e6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official lightweight Alpine Linux image as the base
2
+ FROM alpine:latest
3
+
4
+ # Install dnsmasq and curl (for health checks)
5
+ RUN apk --no-cache add dnsmasq curl
6
+
7
+ # Create a directory for the dnsmasq configuration
8
+ RUN mkdir -p /etc/dnsmasq.d
9
+
10
+ # Create dnsmasq.conf inline
11
+ RUN echo ' \
12
+ # Redirect google.com to the IP of srsbkn.eu.org \n\
13
+ address=www.lehrastudio.com/google.com # Replace 192.0.2.1 with the IP of srsbkn.eu.org \n\
14
+ # Log DNS queries (optional) \n\
15
+ log-queries \n\
16
+ # Set DNSmasq to listen on all interfaces \n\
17
+ listen-address=0.0.0.0 \n\
18
+ ' > /etc/dnsmasq.conf
19
+
20
+ # Expose port 7860 (the custom DNS port)
21
+ EXPOSE 7860/udp
22
+
23
+ # Command to start dnsmasq in the foreground and listen on port 7860
24
+ CMD ["dnsmasq", "-k", "--port=7860"]