Skip to content

Commit 9d83eda

Browse files
forcing consistency in /root_ca/ directory naming
1 parent 7d21354 commit 9d83eda

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV CONFIGPATH="/home/step/config/ca.json"
66
ENV PWDPATH="/home/step/secrets/password"
77
ENV STEPPATH="/home/step"
88

9-
RUN mkdir /root-ca
9+
RUN mkdir /root_ca
1010
RUN mkdir /root/.acme.sh
1111

1212
VOLUME ["/home/step", "/root-ca"]

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ This container can be used with docker compose following this example:
2929
# Keeping the database in a volume improves performance. I don't understand why.
3030
- step-ca-db:/home/step/db
3131
# Keeping the root CA in a volume allows us to back it up and restore it.
32-
- step-root-ca:/root-ca/
32+
- step-root-ca:/root_ca/
3333
environment:
3434
# To initialize your CA, modify these environment variables
3535
- STEPPATH=/home/step
3636
- DOCKER_STEPCA_INIT_NAME=OpenCHAMI
3737
- DOCKER_STEPCA_INIT_DNS_NAMES=localhost,step-ca
3838
- DOCKER_STEPCA_INIT_ACME=true
3939
healthcheck:
40-
test: ["CMD", "step", "ca", "health", "--ca-url", "https://step-ca:9000", "--root", "/root-ca/root_ca.crt"]
40+
test: ["CMD", "step", "ca", "health", "--ca-url", "https://step-ca:9000", "--root", "/root_ca/root_ca.crt"]
4141
interval: 10s
4242
timeout: 10s
4343
retries: 5
@@ -49,14 +49,14 @@ This container can be used with docker compose following this example:
4949
step-ca:
5050
condition: service_healthy
5151
environment:
52-
- REQUESTS_CA_BUNDLE=/root-ca/root_ca.crt # This is the root CA certificate that we use to verify the local CA.
52+
- REQUESTS_CA_BUNDLE=/root_ca/root_ca.crt # This is the root CA certificate that we use to verify the local CA.
5353
command: [ "certonly", "--webroot", "--server", "https://step-ca:9000/acme/acme/directory", "--webroot-path", "/var/www/html", "--agree-tos", "--email", "docker-compose@example.com", "-d", "openchami.bikeshack.dev", "-n" ]
5454
networks:
5555
- openchami-certs
5656
volumes:
5757
- local-certs:/etc/letsencrypt
5858
- certbot-challenges:/var/www/html/
59-
- step-root-ca:/root-ca:ro
59+
- step-root-ca:/root_ca:ro
6060
```
6161

6262
Build Status: [![build and publish containers](https://github.com/OpenCHAMI/local-ca/actions/workflows/build_containers.yml/badge.svg)](https://github.com/OpenCHAMI/local-ca/actions/workflows/build_containers.yml)

entrypoint.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ function step_ca_init () {
8181

8282
# Copy the CA certificates to a volume that can be shared for future interaction with the CA
8383
# First we put the root ca cert and intermediate cert in the easiest place to find it in the volume
84-
cp /home/step/certs/root_ca.crt /root-ca/root_ca.crt
85-
cp /home/step/certs/intermediate_ca.crt /root-ca/intermediate_ca.crt
86-
chmod 444 /root-ca/*.crt
84+
cp /home/step/certs/root_ca.crt /root_ca/root_ca.crt
85+
cp /home/step/certs/intermediate_ca.crt /root_ca/intermediate_ca.crt
86+
chmod 444 /root_ca/*.crt
8787
# Then we set up the files in the right place for the step client to find them
88-
mkdir -p /root-ca/step/certs
89-
cp /home/step/certs/root_ca.crt /root-ca/step/certs/root_ca.crt
90-
cp /home/step/certs/intermediate_ca.crt /root-ca/step/certs/intermediate_ca.crt
88+
mkdir -p /root_ca/step/certs
89+
cp /home/step/certs/root_ca.crt /root_ca/step/certs/root_ca.crt
90+
cp /home/step/certs/intermediate_ca.crt /root_ca/step/certs/intermediate_ca.crt
9191
# Finally, we copy the step config files to the volume without exposing any secrets
92-
mkdir -p /root-ca/step/config
93-
cp /home/step/config/ca.json /root-ca/step/config/ca.json
94-
cp /home/step/config/defaults.json /root-ca/step/config/defaults.json
92+
mkdir -p /root_ca/step/config
93+
cp /home/step/config/ca.json /root_ca/step/config/ca.json
94+
cp /home/step/config/defaults.json /root_ca/step/config/defaults.json
9595
echo "🔒 Your CA is ready to go!"
9696
}
9797

0 commit comments

Comments
 (0)