2023-10-25 15:50:33 +02:00
|
|
|
|
#
|
|
|
|
|
# SPDX-FileCopyrightText: 2023 Afnic
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
#
|
|
|
|
|
|
2023-10-25 15:50:21 +02:00
|
|
|
|
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
|
|
|
|
|
|
2023-10-25 15:50:24 +02:00
|
|
|
|
# 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
|
|
|
|
|
|
2023-10-25 15:50:21 +02:00
|
|
|
|
# TODO mettre un bashrc qui positionne un prompt qui montre bien qu’on est
|
|
|
|
|
# en train d’être méchant
|
|
|
|
|
|
|
|
|
|
COPY --chown=attaquant scripts /home/attaquant/scripts
|
2023-10-25 15:50:24 +02:00
|
|
|
|
|
|
|
|
|
COPY web-api /src/api
|
|
|
|
|
RUN chmod +x /src/api/bin/app.psgi
|
|
|
|
|
|
|
|
|
|
USER attaquant
|
|
|
|
|
ENTRYPOINT ["/src/api/bin/app.psgi"]
|