فهرست منبع

Hardcode files in CMD

This commit replaces the environment variables in CMD with the default
files. This way we can run step-ca on the PID 1.
Mariano Cano 1 سال پیش
والد
کامیت
2d6fa86a4f
3فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 0 1
      cmd/step-ca/main.go
  2. 1 1
      docker/Dockerfile
  3. 1 1
      docker/Dockerfile.hsm

+ 0 - 1
cmd/step-ca/main.go

@@ -102,7 +102,6 @@ Please send us a sentence or two, good or bad: **feedback@smallstep.com** or htt
 `
 
 func main() {
-	fmt.Println(os.Args)
 	// initialize step environment.
 	if err := step.Init(); err != nil {
 		fmt.Fprintln(os.Stderr, err.Error())

+ 1 - 1
docker/Dockerfile

@@ -26,4 +26,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 ["sh", "-c", "/usr/local/bin/step-ca --password-file $PWDPATH $CONFIGPATH"]
+CMD ["/usr/local/bin/step-ca", "--password-file", "/home/step/secrets/password", "/home/step/config/ca.json"]

+ 1 - 1
docker/Dockerfile.hsm

@@ -33,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 ["sh", "-c", "/usr/local/bin/step-ca --password-file $PWDPATH $CONFIGPATH"]
+CMD ["/usr/local/bin/step-ca", "--password-file", "/home/step/secrets/password", "/home/step/config/ca.json"]