Explorar el Código

Update hsm dockerfile as well

Carl Tashian hace 3 años
padre
commit
8242895909
Se han modificado 2 ficheros con 6 adiciones y 5 borrados
  1. 2 1
      docker/Dockerfile.step-ca.hsm
  2. 4 4
      docker/entrypoint.sh

+ 2 - 1
docker/Dockerfile.step-ca.hsm

@@ -24,6 +24,7 @@ USER step
 
 ENV CONFIGPATH="/home/step/config/ca.json"
 ENV PWDPATH="/home/step/secrets/password"
+ENV PROVISIONER_PWDPATH="/home/step/secrets/provisioner_password"
 
 VOLUME ["/home/step"]
 STOPSIGNAL SIGTERM
@@ -32,4 +33,4 @@ HEALTHCHECK CMD step ca health 2>/dev/null | grep "^ok" >/dev/null
 COPY docker/entrypoint.sh /entrypoint.sh
 
 ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
-CMD exec /usr/local/bin/step-ca --password-file $PWDPATH $CONFIGPATH
+CMD exec /usr/local/bin/step-ca --password-file $PWDPATH --provisioner-password-file $PROVISIONER_PWDPATH $CONFIGPATH

+ 4 - 4
docker/entrypoint.sh

@@ -63,10 +63,6 @@ if [ -f /usr/sbin/pcscd ]; then
 	/usr/sbin/pcscd
 fi
 
-if [ ! -f "${STEPPATH}/config/ca.json" ]; then
-	init_if_possible
-fi
-
 if [ ! -f "${STEPPATH}/password" ]; then
     generate_password > "${STEPPATH}/password"
 fi
@@ -75,4 +71,8 @@ if [ ! -f "${STEPPATH}/provisioner_password" ]; then
 	generate_password > "${STEPPATH}/provisioner_password"
 fi
 
+if [ ! -f "${STEPPATH}/config/ca.json" ]; then
+	init_if_possible
+fi
+
 exec "${@}"