spf-dkim-dmarc-demo/attacker/Dockerfile

86 lines
1.7 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# SPDX-FileCopyrightText: 2023 Afnic
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
FROM alpine:latest
WORKDIR /home/attaquant
RUN adduser -D attaquant
RUN apk add \
bash \
bind-tools \
curl \
ncurses-terminfo-base \
opendkim-libs \
opendkim-utils \
perl \
python3 \
py3-dnspython \
py3-pip \
py3-rich
RUN pip install dkimpy
# Dependencies for REST API
RUN apk add \
gcc \
libc-dev \
make \
perl-app-cpanminus \
perl-clone \
perl-config-any \
perl-data-optlist \
perl-dev \
perl-exporter-tiny \
perl-extutils-config \
perl-extutils-helpers \
perl-extutils-installpaths \
perl-file-sharedir \
perl-file-sharedir-install \
perl-file-slurp \
perl-file-which \
perl-hash-merge-simple \
perl-hash-multivalue \
perl-http-date \
perl-http-headers-fast \
perl-import-into \
perl-json-maybexs \
perl-module-build \
perl-module-build-tiny \
perl-module-implementation \
perl-module-runtime \
perl-moo \
perl-params-util \
perl-params-validate \
perl-path-tiny \
perl-plack \
perl-readonly \
perl-ref-util \
perl-role-tiny \
perl-safe-isa \
perl-sub-exporter \
perl-sub-install \
perl-sub-quote \
perl-template-toolkit \
perl-type-tiny \
perl-yaml
RUN cpanm -n -v \
Dancer2 \
Module::Pluggable::Object
# TODO mettre un bashrc qui positionne un prompt qui montre bien quon est
# en train dêtre méchant
COPY --chown=attaquant scripts /home/attaquant/scripts
COPY web-api /src/api
RUN chmod +x /src/api/bin/app.psgi
USER attaquant
ENTRYPOINT ["/src/api/bin/app.psgi"]