Skip to content

Custom Docker Container with TLS / HTTPS certificate #281

@stenh0use

Description

@stenh0use

Took me a little bit to figure out how to create a docker container with custom TLS certificate.

Seeing as there does not seem to be any documentation on this one I thought my solution might be beneficial to others.

Feel free to close.

FROM adobe/s3mock:2.2.0

ENV server.ssl.key-store=/opt/customcert.jks
ENV server.ssl.key-store-password=password
ENV server.ssl.key-alias=selfsigned
ENV server.port=443
ENV http.port=80

RUN keytool -genkey -keyalg RSA -alias selfsigned \
  -validity 360 \
  -keystore /opt/customcert.jks \
  -dname "cn=Test, ou=Test, o=Docker, l=NY, st=NY, c=US" \
  -storepass password -keysize 2048 \
  -ext "san=dns:localhost"

Metadata

Metadata

Assignees

Labels

documentationQuestions and answers RE: missing documentation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions