DEV Community

loading...

Discussion on: Dockerize your Go app

Collapse
yoursunny profile image
Junxiao Shi

/etc/ssl/certs isn't necessary when you build the production container image. It can be mounted when you run the container in production.

Thread Thread
karanpratapsingh profile image
Karan Pratap Singh Author

sure, but why? I'm trying to understand why will I mount it when it's running on kubernetes?

Thread Thread
yoursunny profile image
Junxiao Shi

It's a trade-off between fewer dependency on the host (by including ca-certificates in the image) and smaller image size (by excluding ca-certificates in the image).