-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
49 lines (39 loc) · 1.7 KB
/
Dockerfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM ubuntu:18.04
LABEL maintainer="Team STINGAR <[email protected]>"
LABEL name="rdphoney"
LABEL version="1.9.1"
LABEL release="1"
LABEL summary="RDPHoney Honeypot Container"
LABEL description="RDPHoney is a simple RDP connection honeypot"
LABEL authoritative-source-url="https://github.com/CommunityHoneyNetwork/rdphoney"
LABEL changelog-url="https://github.com/CommunityHoneyNetwork/rdphoney/commits/master"
# Set DOCKER var - used by RDPHoney init to determine logging
ENV DOCKER "yes"
ENV RDPHONEY_GROUP "rdphoney"
ENV RDPHONEY_USER "rdphoney"
ENV RDPHONEY_DIR "/opt"
ENV RDPHONEY_JSON_DIR "/etc/rdphoney/"
ENV DEBIAN_FRONTEND "noninteractive"
# hadolint ignore=DL3008,DL3005
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y python3-apt python3-dev python3-pip python3-setuptools python-twisted-core jq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -r -g 1000 ${RDPHONEY_GROUP} && \
useradd -r -u 1000 -m -g ${RDPHONEY_GROUP} ${RDPHONEY_USER} && \
touch /var/log/honeyrdp.log && \
mkdir ${RDPHONEY_JSON_DIR} && \
chown ${RDPHONEY_USER}:${RDPHONEY_GROUP} /var/log/honeyrdp.log ${RDPHONEY_JSON_DIR} && \
chmod 644 /var/log/honeyrdp.log
WORKDIR ${RDPHONEY_DIR}
COPY entrypoint.sh requirements.txt /code/
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools pika requests fluent-logger cymruwhois \
&& python3 -m pip install -r /code/requirements.txt
COPY rdphoney ${RDPHONEY_DIR}/rdphoney
COPY rdphoney.cfg.dist ${RDPHONEY_DIR}
# Set permissions on rdphoney directory
RUN chown -R ${RDPHONEY_USER} ${RDPHONEY_DIR} && \
chmod +x /code/entrypoint.sh
USER ${RDPHONEY_USER}
ENTRYPOINT ["/code/entrypoint.sh"]