Spaces:
Sleeping
Sleeping
File size: 716 Bytes
bdb4179 dbc64c6 bdb4179 dbc64c6 bdb4179 dbc64c6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# Use an official lightweight Alpine Linux image as the base
FROM alpine:latest
# Install dnsmasq and curl (for health checks)
RUN apk --no-cache add dnsmasq curl
# Create a directory for the dnsmasq configuration
RUN mkdir -p /etc/dnsmasq.d
# Create dnsmasq.conf inline
RUN echo ' \
# Redirect lehrastudio.com to the IP of 195.179.239.105 \n\
address=/lehrastudio.com/195.179.239.105 \n\
# Log DNS queries (optional) \n\
log-queries \n\
# Set DNSmasq to listen on all interfaces \n\
listen-address=0.0.0.0 \n\
# Specify the port for DNS queries \n\
port=7860 \n\
' > /etc/dnsmasq.conf
# Expose port 7860 (the custom DNS port)
EXPOSE 7860/udp
# Command to start dnsmasq in the foreground
CMD ["dnsmasq", "-k"] |