Skip to content

Commit 14bc8a4

Browse files
committed
Add Docker Compose instructions
1 parent 0d0c8af commit 14bc8a4

File tree

1 file changed

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

1 file changed

+39
-2
lines changed

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

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,13 @@ To install a certificate for use in a Docker container:
439439

440440
<Tabs> <TabItem label="Dockerfile">
441441

442-
1. Add the certificate to the Docker build process. For example:
442+
To add the certificate during the build process:
443+
444+
1. Modify the Dockerfile. For example:
443445

444446
```docker title="Red Hat-based images"
445447
FROM registry.access.redhat.com/ubi9/ubi:latest
446-
# Or use: FROM centos:7 or FROM fedora:38
448+
# Or FROM centos:7 or FROM fedora:38
447449
448450
# Install necessary certificates package
449451
RUN dnf install -y ca-certificates
@@ -455,6 +457,7 @@ To install a certificate for use in a Docker container:
455457

456458
```docker title="Debian-based images"
457459
FROM debian:12
460+
# Or FROM ubuntu:22.04
458461
459462
# Install necessary certificates package
460463
RUN apt-get update && apt-get install -y ca-certificates
@@ -495,6 +498,40 @@ To install a certificate for use in a Docker container:
495498

496499
<TabItem label="Docker Compose">
497500

501+
To add the certificate during runtime:
502+
503+
1. Add the certificate to your `docker-compose.yml` file. For example:
504+
505+
```diff lang="yaml" title="Red Hat-based images"
506+
version: '3'
507+
services:
508+
redhat-app:
509+
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"
513+
```
514+
515+
```diff lang="yaml" title="Debian-based images"
516+
version: '3'
517+
services:
518+
debian-app:
519+
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"
523+
```
524+
525+
```diff lang="yaml" title="Alpine-based images"
526+
version: '3'
527+
services:
528+
alpine-app:
529+
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"
533+
```
534+
498535
</TabItem> </Tabs>
499536

500537
### Google Cloud

0 commit comments

Comments
 (0)