I need to generate a self signed certificate when the docker starts . basically our docker is started using concourse ci . So it has to be in the dockerfile and cannot use any options using docker run .
Let me know any inputs for this
I need to generate a self signed certificate when the docker starts . basically our docker is started using concourse ci . So it has to be in the dockerfile and cannot use any options using docker run .
Let me know any inputs for this
I used similar in nginx:alpine:
FROM nginx:1.19.1-alpine
RUN apk update && \
apk add --no-cache openssl && \
openssl req -x509 -nodes -days 365 \
-subj "/C=CA/ST=QC/O=Company Inc/CN=example.com" \
-newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key \
-out /etc/ssl/certs/nginx-selfsigned.crt;