File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,11 @@ docker exec -ti roach-1 /bin/bash
37
37
docker exec -ti roach-2 /bin/bash
38
38
docker exec -ti lb /bin/sh
39
39
docker exec -ti roach-cert /bin/sh
40
+ ```
41
+
42
+ ### Copy Client Certificate and Key
43
+ ``` bash
44
+ docker cp roach-cert:/certs/client/client.root.crt .
45
+ docker cp roach-cert:/certs/client/client.root.key .
46
+ docker cp roach-cert:/certs/client/client.root.key.pk8 .
40
47
```
Original file line number Diff line number Diff line change @@ -40,26 +40,27 @@ RUN cockroach cert create-ca --certs-dir=/tmp/certs/ca --ca-key=/tmp/safe/ca.key
40
40
&& cp -v /tmp/certs/ca/ca.crt /tmp/certs/roach-1 \
41
41
&& cp -v /tmp/certs/ca/ca.crt /tmp/certs/roach-2
42
42
43
- RUN cockroach cert create-client root --certs-dir=/tmp/certs/client --ca-key=/tmp/safe/ca.key
43
+ RUN cockroach cert create-client root --certs-dir=/tmp/certs/client --ca-key=/tmp/safe/ca.key --also-generate-pkcs8-key
44
44
45
45
RUN cp -v /tmp/certs/client/client.* /tmp/certs/roach-0 \
46
46
&& cp -v /tmp/certs/client/client.* /tmp/certs/roach-1 \
47
47
&& cp -v /tmp/certs/client/client.* /tmp/certs/roach-2
48
48
49
- RUN cockroach cert create-node roach-0 --certs-dir=/tmp/certs/roach-0 --ca-key=/tmp/safe/ca.key
50
- RUN cockroach cert create-node roach-1 --certs-dir=/tmp/certs/roach-1 --ca-key=/tmp/safe/ca.key
51
- RUN cockroach cert create-node roach-2 --certs-dir=/tmp/certs/roach-2 --ca-key=/tmp/safe/ca.key
49
+ RUN cockroach cert create-node roach-0 localhost lb --certs-dir=/tmp/certs/roach-0 --ca-key=/tmp/safe/ca.key
50
+ RUN cockroach cert create-node roach-1 localhost lb --certs-dir=/tmp/certs/roach-1 --ca-key=/tmp/safe/ca.key
51
+ RUN cockroach cert create-node roach-2 localhost lb --certs-dir=/tmp/certs/roach-2 --ca-key=/tmp/safe/ca.key
52
52
53
53
# Stage 2 - share certs
54
54
55
55
FROM alpine:latest
56
56
57
57
LABEL maintainer=
"[email protected] "
58
58
59
- RUN mkdir -pv /certs/roach-0 /certs/roach-1 /certs/roach-2
59
+ RUN mkdir -pv /certs/roach-0 /certs/roach-1 /certs/roach-2 /certs/client
60
60
61
61
COPY --from=generator /tmp/certs/roach-0/* /certs/roach-0/
62
62
COPY --from=generator /tmp/certs/roach-1/* /certs/roach-1/
63
63
COPY --from=generator /tmp/certs/roach-2/* /certs/roach-2/
64
+ COPY --from=generator /tmp/certs/client/* /certs/client/
64
65
65
66
CMD tail -f /dev/null
You can’t perform that action at this time.
0 commit comments