@@ -304,6 +304,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
304304 pushImage : options . push ,
305305 selfHostedRegistry : ! ! options . registry ,
306306 noCache : options . noCache ,
307+ extraCACerts : resolvedConfig . config . extraCACerts ?. replace ( / ^ \. / , "/app" ) ?? "" ,
307308 } ) ;
308309 }
309310
@@ -330,6 +331,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
330331 loadImage : options . loadImage ,
331332 buildPlatform : options . buildPlatform ,
332333 noCache : options . noCache ,
334+ extraCACerts : resolvedConfig . config . extraCACerts ?. replace ( / ^ \. / , "/app" ) ?? "" ,
333335 } ,
334336 deploymentSpinner
335337 ) ;
@@ -779,6 +781,7 @@ type BuildAndPushImageOptions = {
779781 loadImage : boolean ;
780782 buildPlatform : string ;
781783 noCache : boolean ;
784+ extraCACerts : string ;
782785} ;
783786
784787type BuildAndPushImageResults =
@@ -837,6 +840,8 @@ async function buildAndPushImage(
837840 `TRIGGER_CONTENT_HASH=${ options . contentHash } ` ,
838841 "--build-arg" ,
839842 `TRIGGER_PROJECT_REF=${ options . projectRef } ` ,
843+ "--build-arg" ,
844+ `NODE_EXTRA_CA_CERTS=${ options . extraCACerts } ` ,
840845 "-t" ,
841846 `${ options . registryHost } /${ options . imageTag } ` ,
842847 "." ,
@@ -961,6 +966,8 @@ async function buildAndPushSelfHostedImage(
961966 `TRIGGER_CONTENT_HASH=${ options . contentHash } ` ,
962967 "--build-arg" ,
963968 `TRIGGER_PROJECT_REF=${ options . projectRef } ` ,
969+ "--build-arg" ,
970+ `NODE_EXTRA_CA_CERTS=${ options . extraCACerts } ` ,
964971 "-t" ,
965972 imageRef ,
966973 "." , // The build context
@@ -1821,6 +1828,10 @@ export async function copyAdditionalFiles(
18211828 tempDir : string
18221829) : Promise < AdditionalFilesReturn > {
18231830 const additionalFiles = config . additionalFiles ?? [ ] ;
1831+ const extraCACerts = config . extraCACerts ?? '' ;
1832+ if ( extraCACerts ) {
1833+ additionalFiles . push ( extraCACerts ) ;
1834+ }
18241835 const noMatches : string [ ] = [ ] ;
18251836
18261837 if ( additionalFiles . length === 0 ) {
0 commit comments