{"id":1869,"date":"2026-02-06T20:22:53","date_gmt":"2026-02-06T18:22:53","guid":{"rendered":"https:\/\/cln.io\/blog\/?p=1869"},"modified":"2026-03-08T18:00:06","modified_gmt":"2026-03-08T16:00:06","slug":"getting-applications-to-work-with-ca-bundles-onprem-self-hosted-with-dockers","status":"publish","type":"post","link":"https:\/\/cln.io\/blog\/getting-applications-to-work-with-ca-bundles-onprem-self-hosted-with-dockers\/","title":{"rendered":"Getting applications to work with CA bundles \/ onprem \/ self hosted with dockers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Notes to my future self<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Get a bundle of the CA + if applicable the sub CA and append them<br>Throw them into a docker secret mount them as a secret, under your service mount them<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    secrets:\n      - CA_BUNDLE\n      - source: CA_BUNDLE\n        target: \"\/usr\/local\/share\/ca-certificates\/custom\/CA_BUNDLE.crt\"\n      - source: CA_BUNDLE\n        target: \"\/etc\/ssl\/certs\/CA_BUNDLE.pem\"\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add them below the services too!<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">secrets:\n  CA_BUNDLE:\n    external: true<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also depending on the app, which in my case is mostly node, mount the CA bundle in the env variable too!<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    environment:\n      NODE_EXTRA_CA_CERTS: \"\/run\/secrets\/CA_BUNDLE\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a docker secret<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker secret create CA_BUNDLE - &lt;&lt;'EOF'\n-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\nEOF<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Full example<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">services:\n  demo:\n    image: alpine\n    environment:\n      NODE_EXTRA_CA_CERTS: \"\/run\/secrets\/CA_BUNDLE\"\n    secrets:\n      - CA_BUNDLE\n      - source: CA_BUNDLE\n        target: \/usr\/local\/share\/ca-certificates\/custom\/CA_BUNDLE.crt\n      - source: CA_BUNDLE\n        target: \/etc\/ssl\/certs\/CA_BUNDLE.pem\n\nsecrets:\n  CA_BUNDLE:\n    file: .\/CA_BUNDLE.crt\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Notes to my future self Get a bundle of the CA + if applicable the sub CA and append themThrow them into a docker secret mount them as a secret, under your service mount them [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2041,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,26,58],"tags":[],"class_list":["post-1869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-it","category-miscellaneous"],"_links":{"self":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/1869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/comments?post=1869"}],"version-history":[{"count":2,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/1869\/revisions"}],"predecessor-version":[{"id":1873,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/posts\/1869\/revisions\/1873"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/media\/2041"}],"wp:attachment":[{"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/media?parent=1869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/categories?post=1869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cln.io\/blog\/wp-json\/wp\/v2\/tags?post=1869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}