Skip to content
Snippets Groups Projects
Earthfile 714 B
VERSION --use-copy-include-patterns 0.5

install-deps:
    FROM debian:stable@sha256:13db79e523a13e3e55b606128a4193d7b9ae788d0c11c95d6a6de0bd30aa3a14

shorewall-deps:
    FROM +install-deps
    RUN apt update
    RUN apt install shorewall shorewall6 ipset -y
    USER root

validate-shorewall:
    FROM +shorewall-deps
    RUN apt update
    RUN apt install shorewall ipset -y
    COPY ./roles/firewall/files/shorewall /tmp/shorewall
    RUN --privileged shorewall check /tmp/shorewall

validate-shorewall6:
    FROM +shorewall-deps
    COPY ./roles/firewall/files/shorewall6 /tmp/shorewall6
    RUN --privileged shorewall6 check /tmp/shorewall6

test:
    BUILD +validate-shorewall
    BUILD +validate-shorewall6