File: Dockerfile

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 (18 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# syntax=docker/dockerfile:1

FROM alpine:edge AS gen
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk --update --no-cache add mkcert@testing ca-certificates
WORKDIR /certs
RUN mkdir -p daemon client
ARG SAN=localhost
ARG SAN_CLIENT=client
RUN echo $SAN | tr " " "\n" >SAN
RUN CAROOT=$(pwd) mkcert -cert-file daemon/cert.pem -key-file daemon/key.pem $SAN
RUN CAROOT=$(pwd) mkcert -client -cert-file client/cert.pem -key-file client/key.pem $SAN_CLIENT
RUN cp -f rootCA.pem daemon/ca.pem
RUN cp -f rootCA.pem client/ca.pem
RUN rm -f rootCA.pem rootCA-key.pem

FROM scratch
COPY --from=gen /certs /