Dockerfile: set key env vars after generating keys

This change should have no impact for the moment, but in general it makes more
sense to generate the keys before pointing to them with environment variables.
Once we switch to a stricter version of go-flags, this change will be necessary
to prevent the `concourse generate-key` commands from failing.

Signed-off-by: Jamie Klassen <cklassen@pivotal.io>
This commit is contained in:
Jamie Klassen 2020-04-22 11:52:35 -04:00
parent f4d687478f
commit 7253207bc4
1 changed files with 9 additions and 0 deletions

View File

@ -29,3 +29,12 @@ RUN concourse generate-key -t rsa -b 1024 -f /concourse-keys/session_signing_key
RUN concourse generate-key -t ssh -b 1024 -f /concourse-keys/tsa_host_key
RUN concourse generate-key -t ssh -b 1024 -f /concourse-keys/worker_key
RUN cp /concourse-keys/worker_key.pub /concourse-keys/authorized_worker_keys
# 'web' keys
ENV CONCOURSE_SESSION_SIGNING_KEY /concourse-keys/session_signing_key
ENV CONCOURSE_TSA_AUTHORIZED_KEYS /concourse-keys/authorized_worker_keys
ENV CONCOURSE_TSA_HOST_KEY /concourse-keys/tsa_host_key
# 'worker' keys
ENV CONCOURSE_TSA_PUBLIC_KEY /concourse-keys/tsa_host_key.pub
ENV CONCOURSE_TSA_WORKER_PRIVATE_KEY /concourse-keys/worker_key