I have Dockerfile for an image that I would like to publish to docker hub so it can be easily available to users without building the image themselves. The whole thing is meant for labbing and tutorial purpose, NOT production.
The container run from that image can be accessed by SSH using public key, for that, the public key need to be generated and placed in Dockerfile directory before exported to docker hub, without it dockerhub cannot build the image.
I would like to generate a separated key pair (public+private) from my PC, and make them both available for users. Of course the keypair is only for the image I am publishing.
Though each key pairs are different, is there any security risk for exposing the secret key?