Skip to content

Commit 4828bb6

Browse files
committed
Add runtime procedure
1 parent 702b11b commit 4828bb6

File tree

1 file changed

+35
-19
lines changed
  • src/content/docs/cloudflare-one/connections/connect-devices/warp/user-side-certificates

1 file changed

+35
-19
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/warp/user-side-certificates/manual-deployment.mdx

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ To install a certificate for use in a Docker container:
443443

444444
1. Add the certificate install directions to your Dockerfile. For example:
445445

446-
```docker title="Red Hat-based images"
446+
```docker title="Red Hat-based containers"
447447
FROM registry.access.redhat.com/ubi9/ubi:latest
448448
# Or FROM centos:7 or FROM fedora:38
449449
@@ -455,7 +455,7 @@ To install a certificate for use in a Docker container:
455455
RUN update-ca-trust extract
456456
```
457457

458-
```docker title="Debian-based images"
458+
```docker title="Debian-based containers"
459459
FROM debian:12
460460
# Or FROM ubuntu:22.04
461461
@@ -467,7 +467,7 @@ To install a certificate for use in a Docker container:
467467
RUN update-ca-certificates
468468
```
469469

470-
```docker title="Alpine-based images"
470+
```docker title="Alpine-based containers"
471471
FROM alpine:3.18
472472
473473
# Install necessary certificates package
@@ -478,19 +478,19 @@ To install a certificate for use in a Docker container:
478478
RUN update-ca-certificates
479479
```
480480

481-
2. Build the Docker image:
481+
2. Build the Docker container:
482482

483483
```sh
484-
docker build -t your-image-name .
484+
docker build -t <your-container-name> .
485485
```
486486

487487
3. Verify the certificate was installed:
488488

489-
```sh title="Red Hat-based images"
489+
```sh title="Red Hat-based containers"
490490
docker run --rm your-image-name sh -c "cat /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem | grep Cloudflare"
491491
```
492492

493-
```sh title="Debian and Alpine-based images"
493+
```sh title="Debian and Alpine-based containers"
494494
docker run --rm your-image-name sh -c "cat /etc/ssl/certs/certificate.pem"
495495
```
496496

@@ -502,34 +502,50 @@ To install a certificate for use in a Docker container:
502502

503503
1. Add the certificate install directions to your `docker-compose.yml` file. For example:
504504

505-
```diff lang="yaml" title="Red Hat-based images"
505+
```yaml title="Red Hat-based containers"
506506
version: '3'
507507
services:
508508
redhat-app:
509509
image: registry.access.redhat.com/ubi9/ubi:latest
510-
+ volumes:
511-
+ - /path/to/certificate.pem:/etc/pki/ca-trust/source/anchors/certificate.pem
512-
+ entrypoint: /bin/sh -c "dnf install -y ca-certificates && update-ca-trust extract && app start"
510+
volumes:
511+
- /path/to/certificate.pem:/etc/pki/ca-trust/source/anchors/certificate.pem
512+
entrypoint: /bin/sh -c "dnf install -y ca-certificates && update-ca-trust extract && app start"
513513
```
514514
515-
```diff lang="yaml" title="Debian-based images"
515+
```yaml title="Debian-based containers"
516516
version: '3'
517517
services:
518518
debian-app:
519519
image: debian:12
520-
+ volumes:
521-
+ - /path/to/certificate.pem:/usr/local/share/ca-certificates/certificate.crt
522-
+ entrypoint: /bin/sh -c "apt-get update && apt-get install -y ca-certificates && update-ca-certificates && app start"
520+
volumes:
521+
- /path/to/certificate.pem:/usr/local/share/ca-certificates/certificate.crt
522+
entrypoint: /bin/sh -c "apt-get update && apt-get install -y ca-certificates && update-ca-certificates && app start"
523523
```
524524
525-
```diff lang="yaml" title="Alpine-based images"
525+
```yaml title="Alpine-based containers"
526526
version: '3'
527527
services:
528528
alpine-app:
529529
image: alpine:3.18
530-
+ volumes:
531-
+ - /path/to/cert.pem:/usr/local/share/ca-certificates/cert.pem
532-
+ entrypoint: /bin/sh -c "apk add --no-cache ca-certificates && update-ca-certificates && app start"
530+
volumes:
531+
- /path/to/cert.pem:/usr/local/share/ca-certificates/cert.pem
532+
entrypoint: /bin/sh -c "apk add --no-cache ca-certificates && update-ca-certificates && app start"
533+
```
534+
535+
2. Run the container:
536+
537+
```sh
538+
docker-compose up
539+
```
540+
541+
3. Verify the certificate was installed:
542+
543+
```sh title="Red Hat-based containers"
544+
docker exec -it <container-name> sh -c "cat /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem | grep Cloudflare"
545+
```
546+
547+
```sh title="Debian and Alpine-based containers"
548+
docker exec -it <container-name> sh -c "cat /etc/ssl/certs/ca-certificates.crt | grep Cloudflare"
533549
```
534550

535551
</TabItem> </Tabs>

0 commit comments

Comments
 (0)