Skip to content

Conversation

@maraino
Copy link
Contributor

@maraino maraino commented Dec 4, 2025

This commit updates the Debian version in the docker images from bookworm to trixie, the latest stable version.

Requires:

Fixes #2469, #2480

@hslatman @tashian: I wasn't sure how to avoid using the shell, without it the environment variables are not expanded. And if I use the old version, that will use a shell, the docker language server complains with:

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals (JSON arguments recommended for CMD to prevent unintended behavior related to OS signals)Docker DX (docker-language-server) JSONArgsRecommended

I've decided to hardcode the password and configuration path, so you can have step-ca running with the PID 1 with a command like this:

docker run --rm \
  -e DOCKER_STEPCA_INIT_NAME=localhsot \
  -e DOCKER_STEPCA_INIT_DNS_NAMES=localhost \
  smallstep/step-ca:hsm

And k8s or docker allows you to change the CMD easily.

This commit updates the Debian version in the docker images from
bookworm to trixie, the latest stable version.
@maraino maraino requested a review from hslatman December 4, 2025 23:14
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Dec 4, 2025
@hslatman hslatman linked an issue Dec 4, 2025 that may be closed by this pull request
@hslatman
Copy link
Member

hslatman commented Dec 4, 2025

@maraino also see #2480 and #2469.

@hslatman hslatman added this to the v0.29.1 milestone Dec 4, 2025
This commit replaces the environment variables in CMD with the default
files. This way we can run step-ca on the PID 1.
Copy link
Member

@hslatman hslatman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing it to not use the environment variables could break existing deployments, although I doubt many would've changed the location of the password file. If we're OK with that, then I think the ENV declarations can be removed too?


ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
CMD exec /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"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked because of the exec, I suppose, as then it would run a shell? If you change the CMD to use e.g. ["sh", "-c", "step-ca ..."] they would get interpreted too, I believe, but then the CA runs as a subprocess.

One workaround could be to have step-ca read the password file flag value from the environment directly instead of from the flag? Basically what we do in other places supporting both environment variables and flags.

@hslatman hslatman requested a review from tashian December 5, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump docker images to Debian Trixie Add yubihsm-pkcs11 in step-ca:hsm docker image

3 participants