You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what I am doing at the moment, but it feels like I am way too deep into this and there should be a simpler way?
conststream=awaitdocker.buildImage({context: temporaryDirectory,src: ['Dockerfile', ...(files?.map((file)=>file.name)??[])],},{t: tag,version: '2',},);constlogs: string[]=[];awaitnewPromise((resolve,reject)=>{docker.modem.followProgress(stream,(error,response)=>{if(error){reject(error);}else{resolve(response);}},(event)=>{if(!isObjectLike(event)){reject(newUnexpectedStateError('Expected event to be an object'));return;}if('error'inevent){reject(newDockerBuildError('Build failed',{error: event.error,logs: logs.join('\n'),}),);return;}if(isBuildkitTraceEvent(event)){constlog=Buffer.from(event.aux,'base64').toString();if(log){console.log('log',log);logs.push(log);}return;}if(isImageIdEvent(event)){return;}reject(newUnexpectedStateError('Expected event to be an object',{
event,}),);},);});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is what I am doing at the moment, but it feels like I am way too deep into this and there should be a simpler way?
Beta Was this translation helpful? Give feedback.
All reactions