spf-dkim-dmarc-demo/console/Dockerfile

92 lines
2.1 KiB
Docker
Raw Normal View History

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:25 +02:00
FROM alpine:latest AS bootstrap-build
RUN mkdir /target
ADD https://github.com/twbs/bootstrap/archive/v5.3.0.zip /src/bootstrap-5.3.0.zip
RUN apk add sassc
RUN unzip -d /src /src/bootstrap-5.3.0.zip
RUN ln -nsf /src/bootstrap-5.3.0 /src/bootstrap
COPY scss /src
RUN /bin/sh -c "cd /src && sassc main.scss -t compressed /target/main.css"
FROM alpine:latest
RUN apk add \
bash \
bind \
bind-tools \
vim
# 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 \
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 apk add perl-io-socket-ssl perl-lwp-protocol-https
RUN cpanm -n -v \
Dancer2 \
Dancer2::Plugin::Deferred \
2023-10-25 15:50:25 +02:00
REST::Client \
Module::Pluggable::Object
COPY web-api /src/web-ui
RUN chmod +x /src/web-ui/bin/app.psgi
COPY --from=bootstrap-build /src/bootstrap/dist/js/bootstrap.bundle.min.js \
/src/web-ui/public/javascripts/bootstrap.bundle.min.js
COPY --from=bootstrap-build /target/main.css /src/web-ui/public/css/main.css
ENTRYPOINT ["/usr/bin/plackup", "--path", "/console", "-p", "3000", "/src/web-ui/bin/app.psgi"]