2020-08-10 15:03:40 +02:00
|
|
|
FROM golang:1.13 as envtpl
|
|
|
|
|
|
|
|
ARG HTTP_PROXY=
|
|
|
|
ARG HTTPS_PROXY=
|
|
|
|
ARG http_proxy=
|
|
|
|
ARG https_proxy=
|
2022-11-17 09:14:46 +01:00
|
|
|
ARG GIT_USERNAME=
|
|
|
|
ARG GIT_PASSWORD=
|
2020-08-10 15:03:40 +02:00
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get install -y git
|
|
|
|
|
|
|
|
RUN git clone https://github.com/subfuzion/envtpl /src \
|
|
|
|
&& cd /src \
|
|
|
|
&& git checkout v1.0.0 \
|
|
|
|
&& CGO_ENABLED=0 GOOS=linux go build \
|
|
|
|
-ldflags "-X main.AppVersionMetadata=$(date -u +%s)" \
|
|
|
|
-a -installsuffix cgo -o ./bin/envtpl ./cmd/envtpl/.
|
|
|
|
|
2022-11-17 09:14:46 +01:00
|
|
|
FROM alpine:3.16
|
2020-08-10 15:03:40 +02:00
|
|
|
|
|
|
|
ARG HTTP_PROXY=
|
|
|
|
ARG HTTPS_PROXY=
|
|
|
|
ARG http_proxy=
|
|
|
|
ARG https_proxy=
|
|
|
|
|
|
|
|
COPY --from=envtpl /src/bin/envtpl /usr/local/bin/envtpl
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
nss \
|
|
|
|
freetype \
|
|
|
|
freetype-dev \
|
|
|
|
harfbuzz \
|
|
|
|
ca-certificates \
|
|
|
|
ttf-freefont \
|
|
|
|
nodejs \
|
|
|
|
npm \
|
|
|
|
chromium \
|
2022-11-17 09:14:46 +01:00
|
|
|
bash \
|
|
|
|
curl \
|
|
|
|
openssl \
|
|
|
|
git
|
2020-08-10 15:03:40 +02:00
|
|
|
|
2022-11-17 09:14:46 +01:00
|
|
|
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
2020-08-10 15:03:40 +02:00
|
|
|
|
2022-11-17 09:14:46 +01:00
|
|
|
RUN PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g pa11y git+https://forge.cadoles.com/rmasson/junit-reporter-fork.git
|
|
|
|
|
|
|
|
RUN adduser -D pa11y
|
2020-08-10 15:03:40 +02:00
|
|
|
|
|
|
|
COPY run-audit.sh /usr/local/bin/run-audit
|
|
|
|
RUN chmod +x /usr/local/bin/run-audit
|
|
|
|
|
|
|
|
COPY patty.json.tmpl /home/pa11y/patty.json.tmpl
|
|
|
|
|
|
|
|
WORKDIR /home/pa11y
|
|
|
|
|
|
|
|
RUN mkdir /home/pa11y/reports
|
|
|
|
|
|
|
|
RUN chown -R pa11y: /home/pa11y
|
|
|
|
|
|
|
|
USER pa11y
|
|
|
|
|
|
|
|
CMD /usr/local/bin/run-audit
|