-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.20.04-latest
38 lines (29 loc) · 1.36 KB
/
Dockerfile.20.04-latest
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
FROM neomediatech/ubuntu-base:20.04
ENV SERVICE=fail2ban \
APP_VERSION=1.0.2
LABEL maintainer="[email protected]" \
org.label-schema.version=$APP_VERSION \
org.label-schema.vcs-type=Git \
org.label-schema.vcs-url=https://github.com/Neomediatech/${SERVICE} \
org.label-schema.maintainer=Neomediatech
RUN apt-get update && apt-get -y dist-upgrade && \
apt-get install -y --no-install-recommends --no-install-suggests \
libexpat1 libmpdec2 libpython3-stdlib \
libreadline8 libsqlite3-0 python3 python3-minimal \
readline-common wget ipset iptables ssmtp redis-tools curl whois ca-certificates && \
rm -rf /var/lib/apt/lists* && \
rm -rf /etc/fail2ban/jail.d && \
mkdir -p /var/run/fail2ban && \
cd /tmp && \
wget https://github.com/fail2ban/fail2ban/releases/download/${APP_VERSION}/fail2ban_${APP_VERSION}-1.upstream1_all.deb && \
dpkg -i fail2ban_${APP_VERSION}-1.upstream1_all.deb && \
cd / && \
#mkdir -p /usr/local/etc/fail2ban && \
#cp -rp /etc/fail2ban /usr/local/etc && \
rm -rfv /tmp/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh
VOLUME [ "/data" ]
ENTRYPOINT [ "/tini", "--", "/entrypoint.sh" ]
CMD [ "fail2ban-server", "-f", "-x", "-v", "start" ]
HEALTHCHECK --interval=30s --timeout=5s CMD fail2ban-client ping