grim/gf2b

bb2efaa4e4db
The push task needs the same environment variables as the build task
# grad doctl in a separate container so we can keep the final one tiny
FROM debian:buster-slim as doctl
ENV DOCTL_VERSION=1.18.0
RUN set -ex && \
apt-get update && \
apt-get install -y --no-install-recommends wget ca-certificates
RUN set -ex && \
wget https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz -O doctl.tar.gz && \
wget https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.sha256 -O doctl.sha256 && \
tar zxf doctl.tar.gz && \
sha256sum -c doctl.sha256 && \
chmod +x /doctl
# The actual image with fail2ban
FROM debian:buster-slim
RUN set -ex && \
apt-get update && \
apt-get install --no-install-recommends -y fail2ban && \
apt-get clean && \
rm -rf /var/lib/apt/lists && \
rm -f /etc/fail2ban/jail.d/* && \
mkdir -p /var/run/fail2ban
COPY --from=doctl /doctl /usr/local/bin/doctl
CMD ["/usr/bin/fail2ban-server", "-f", "--logtarget", "stdout"]