-
Notifications
You must be signed in to change notification settings - Fork 182
/
Dockerfile
84 lines (79 loc) · 2.42 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This file is part of the dionaea honeypot
#
# SPDX-FileCopyrightText: none
#
# SPDX-License-Identifier: CC0-1.0
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
COPY . /code
RUN apt-get update && \
# Install build deps
apt-get install -y --no-install-recommends \
build-essential \
cmake \
check \
cython3 \
libcurl4-openssl-dev \
libemu-dev \
libev-dev \
libglib2.0-dev \
libloudmouth1-dev \
libnetfilter-queue-dev \
libpcap-dev \
libssl-dev \
libtool \
libudns-dev \
python3 \
python3-dev \
python3-bson \
python3-yaml \
python3-boto3 \
fonts-liberation && \
# Build
mkdir -p /code/build && \
cd /code/build && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/dionaea /code && \
make && \
make install && \
# Create user and group
addgroup --gid 1000 dionaea && \
adduser --system --no-create-home --shell /bin/bash --uid 1000 --disabled-password --disabled-login --gid 1000 dionaea && \
# Set permissions
chown -R dionaea:dionaea /opt/dionaea/var && \
# Prepare additional stuff
cp /code/docker/entrypoint.sh /usr/local/sbin/entrypoint.sh && \
mkdir -p /opt/dionaea/template && \
(cd /opt/dionaea && mv var/lib template/ && mv var/log template/ && mv etc template/) && \
# Remove dev packages
apt-get purge -y \
build-essential \
cmake \
check \
cython3 \
libcurl4-openssl-dev \
libemu-dev \
libev-dev \
libglib2.0-dev \
libloudmouth1-dev \
libnetfilter-queue-dev \
libpcap-dev \
libssl-dev \
libtool \
libudns-dev \
python3-dev && \
# Install required packages
apt-get install -y --no-install-recommends \
ca-certificates \
libcurl4 \
libemu2 \
libev4 \
libglib2.0-0 \
libnetfilter-queue1 \
libpcap0.8 \
libpython3.6 \
libudns0 && \
# Clean up
apt-get autoremove --purge -y && \
apt-get clean && \
rm -rf /code/ /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]