-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Certificates vanish in legacy docker engine builder #1421
Comments
Workaround, for now, is to write the files to the |
Hey @DanielHabenicht How are you running the container? When running step-ca inside a container, you would normally want to mount /home/step/ inside the container to something outside on the host or in a Docker Volume so the files generated persist. |
I am only running |
If you want to persist certificates you need to mount a volume to do so. Otherwise the stage in the build will not persist any data at the end of the build. |
But I just want them to be included in my test image, as stated in my initial message. I can understand if you took measures to remove certificates from the home directory for improved security. If so than it should documented. Also this would raise the question why it is working with the newer docker build engine (not |
@DanielHabenicht you shouldn't need the |
Yes that helps: FROM smallstep/step-cli AS certs
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID
RUN pwd && step certificate create "Smallstep Root CA" "/home/step/cacert.pem" "/home/step/cakey.pem" \
--no-password --insecure \
--profile root-ca \
--not-before "2021-01-01T00:00:00+00:00" \
--not-after "2031-01-01T00:00:00+00:00" \
--san "example.com" \
--san "mail.example.com" \
--kty RSA --size 2048
FROM docker.io/mailserver/docker-mailserver
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID
ENV OVERRIDE_HOSTNAME=mail.example.com
ENV SSL_TYPE=manual
ENV SSL_CERT_PATH=/tmp/dms/custom-certs/cacert.pem
ENV SSL_KEY_PATH=/tmp/dms/custom-certs/cakey.pem
COPY --from=certs /home/step/* /tmp/dms/custom-certs/ |
Hey @DanielHabenicht it looks like @tashian was able to help you sort out your issues here. I am going to close this ticket out. |
Steps to Reproduce
Your Environment
step-ca
Version - latest ---> 624886655681Expected Behavior
Files should still be there
Actual Behavior
Files can't be copied, as they are not there.
Additional Context
I am initially coming from here: testcontainers/testcontainers-dotnet#914
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: