forked from dmachard/python-dnstap-receiver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 801 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 801 Bytes
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
27
28
29
FROM python:3.10-alpine
LABEL name="Python dnstap receiver" \
description="Dnstap streams receiver" \
url="https://github.com/dmachard/dnstap-receiver" \
maintainer="d.machard@gmail.com"
WORKDIR /home/dnstap
COPY . /home/dnstap/
RUN true \
&& apk update \
&& apk add gcc musl-dev \
&& adduser -D dnstap \
&& pip install --no-cache-dir -r requirements.txt\
&& apk del gcc musl-dev \
&& cd /home/dnstap \
&& mkdir -p /home/dnstap/logs/ \
&& sed -i 's/local-address: 127.0.0.1/local-address: 0.0.0.0/g' ./dnstap_receiver/dnstap.conf \
&& chown -R dnstap:dnstap /home/dnstap \
&& true
USER dnstap
EXPOSE 6000/tcp
EXPOSE 8080/tcp
ENTRYPOINT ["python", "-c", "from dnstap_receiver.receiver import start_receiver; start_receiver()"]