File: Dockerfile.gencerts

package info (click to toggle)
docker.io 27.5.1%2Bdfsg4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 67,384 kB
  • sloc: sh: 5,847; makefile: 1,146; ansic: 664; python: 162; asm: 133
file content (20 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# syntax=docker/dockerfile:1

ARG GO_VERSION=1.22.11

FROM golang:${GO_VERSION}-alpine AS generated
ENV GOTOOLCHAIN=local
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
  quicktls -exp 87600h -org=Docker -with-san notary-server notaryserver evil-notary-server evilnotaryserver localhost 127.0.0.1
  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 /