| 1 |
# syntax=docker/dockerfile:1 |
| 2 |
|
| 3 |
ARG GO_VERSION=1.24.9 |
| 4 |
|
| 5 |
FROM golang:${GO_VERSION}-alpine AS generated |
| 6 |
ENV GOTOOLCHAIN=local |
| 7 |
RUN go install github.com/dmcgowan/quicktls@master |
| 8 |
WORKDIR /tmp/gencerts/notary |
| 9 |
RUN --mount=type=bind,source=e2e/testdata/notary,target=/tmp/gencerts/notary,rw <<EOT |
| 10 |
set -eu |
| 11 |
mkdir -p ../notary-evil /out |
| 12 |
quicktls -exp 87600h -org=Docker -with-san notary-server notaryserver evil-notary-server evilnotaryserver localhost 127.0.0.1 |
| 13 |
cat ca.pem >> notary-server.cert |
| 14 |
mv ca.pem root-ca.cert |
| 15 |
cp notary-server.cert notary-server.key root-ca.cert ../notary-evil |
| 16 |
cp -r /tmp/gencerts/notary* /out/ |
| 17 |
EOT |
| 18 |
|
| 19 |
FROM scratch |
| 20 |
COPY --from=generated /out / |