-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (50 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
55 lines (50 loc) · 1.15 KB
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
FROM debian:buster-slim
LABEL org.opencontainers.image.source="https://github.com/opencloudengineer/csf" \
description="CSF + LFD in Docker" \
maintainer="Siddharth Tiwari <serverlessengineer@gmail.com>"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -yqq update \
&& apt-get -yqq install --no-install-recommends \
perl \
libwww-perl \
liblwp-protocol-https-perl \
libgd-graph-perl \
# Install all the dependencies required by CSF
# As mentioned in the (SECTION:OS Specific Settings)
# Except systemctl - as it is only needed by csf to disable firewalld
iptables \
curl \
sendmail \
net-tools \
procps \
unzip \
coreutils \
gzip \
grep \
e2fsprogs \
iproute2 \
wget \
kmod \
ipset \
host \
&& cd /tmp \
# download CSF
&& curl -sLo \
/tmp/csf.tgz \
https://download.configserver.com/csf.tgz \
&& tar xzf csf.tgz \
&& cd csf \
# install CSF
&& sh install.sh \
# cleanup
&& apt-get clean \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
# enable lfd
&& sed -i \
'/^TESTING =/c TESTING = "0"' \
/etc/csf/csf.conf \
&& touch /var/log/lfd.log
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT [ "entrypoint.sh" ]