2023-03-27 06:53:56 -04:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2024-09-02 09:49:35 -04:00
|
|
|
ARG GO_VERSION=1.22.6
|
2023-03-27 06:53:56 -04:00
|
|
|
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS generated
|
2023-09-26 06:43:38 -04:00
|
|
|
ENV GOTOOLCHAIN=local
|
2023-03-27 06:53:56 -04:00
|
|
|
RUN go install github.com/dmcgowan/quicktls@master
|
|
|
|
WORKDIR /tmp/gencerts/notary
|
|
|
|
RUN --mount=type=bind,source=e2e/testdata/notary,target=/tmp/gencerts/notary,rw <<EOT
|
|
|
|
set -eu
|
|
|
|
mkdir -p ../notary-evil /out
|
2023-03-27 07:27:39 -04:00
|
|
|
quicktls -exp 87600h -org=Docker -with-san notary-server notaryserver evil-notary-server evilnotaryserver localhost 127.0.0.1
|
2023-03-27 06:53:56 -04:00
|
|
|
cat ca.pem >> notary-server.cert
|
|
|
|
mv ca.pem root-ca.cert
|
|
|
|
cp notary-server.cert notary-server.key root-ca.cert ../notary-evil
|
|
|
|
cp -r /tmp/gencerts/notary* /out/
|
|
|
|
EOT
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=generated /out /
|