Skip to content

Commit 8042cf1

Browse files
committed
Add more steps
1 parent ecd8d7e commit 8042cf1

File tree

1 file changed

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

1 file changed

+43
-9
lines changed

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

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -432,23 +432,57 @@ Before you install a certificate to a Docker container, you must add it to the D
432432
└── certificate.pem
433433
```
434434

435-
4. Add the certificate to the build process:
435+
4. Add the certificate to the build process by adding the following to your dockerfile:
436436

437-
<Tabs>
437+
```docker title="Red Hat/CentOS/Fedora-based images"
438+
FROM registry.access.redhat.com/ubi9/ubi:latest
439+
# Or use: FROM centos:7 or FROM fedora:38
438440
439-
<TabItem label="During build">
441+
# Install necessary certificates package
442+
RUN dnf install -y ca-certificates
440443
441-
During build
444+
# Copy and add Cloudflare root certificate
445+
COPY certs/certificate.pem /etc/pki/ca-trust/source/anchors/certificate.crt
446+
RUN update-ca-trust extract
447+
```
448+
449+
```docker title="Debian/Ubuntu-based images"
450+
FROM ubuntu:22.04
442451
443-
</TabItem>
452+
# Install necessary certificates package
453+
RUN apt-get update && apt-get install -y ca-certificates
444454
445-
<TabItem label="Multi-stage build">
455+
# Copy and add Cloudflare root certificate
456+
COPY certs/certificate.pem /usr/local/share/ca-certificates/certificate.crt
457+
RUN update-ca-certificates
458+
```
446459

447-
Multi-stage build
460+
```docker title="Alpine-based images"
461+
FROM alpine:3.18
448462
449-
</TabItem>
463+
# Install necessary certificates package
464+
RUN apk add --no-cache ca-certificates
450465
451-
</Tabs>
466+
# Copy and add Cloudflare root certificate
467+
COPY certs/certificate.pem /usr/local/share/ca-certificates/certificate.crt
468+
RUN update-ca-certificates
469+
```
470+
471+
5. Build the Docker image:
472+
473+
```sh
474+
docker build -t your-image-name .
475+
```
476+
477+
6. Verify the certificate was installed:
478+
479+
```sh title="Red Hat-based images"
480+
docker run --rm your-image-name sh -c "cat /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem | grep Cloudflare"
481+
```
482+
483+
```sh title="Debian/Ubuntu/Alpine-based images"
484+
docker run --rm your-image-name sh -c "cat /etc/ssl/certs/certificate.pem"
485+
```
452486

453487
### Google Cloud
454488

0 commit comments

Comments
 (0)