mirror of
				https://github.com/docker/build-push-action.git
				synced 2025-11-04 00:10:55 +00:00 
			
		
		
		
	Merge pull request #58 from useblacksmith/bump-sock-timeout
src: bump socket creation timeout to 5s from 3s
This commit is contained in:
		
				commit
				
					
						e00a3895c3
					
				
			
		
					 3 changed files with 4 additions and 4 deletions
				
			
		
							
								
								
									
										2
									
								
								dist/index.js
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
										
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
				
			
			@ -457,7 +457,7 @@ async function getBuilderAddr(inputs: context.Inputs, dockerfilePath: string): P
 | 
			
		|||
    core.debug(`buildkitd daemon started at addr ${buildkitdAddr}`);
 | 
			
		||||
    // Change permissions on the buildkitd socket to allow non-root access
 | 
			
		||||
    const startTime = Date.now();
 | 
			
		||||
    const timeout = 3000; // 3 seconds in milliseconds
 | 
			
		||||
    const timeout = 5000; // 5 seconds in milliseconds
 | 
			
		||||
 | 
			
		||||
    while (Date.now() - startTime < timeout) {
 | 
			
		||||
      if (fs.existsSync('/run/buildkit/buildkitd.sock')) {
 | 
			
		||||
| 
						 | 
				
			
			@ -469,7 +469,7 @@ async function getBuilderAddr(inputs: context.Inputs, dockerfilePath: string): P
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    if (!fs.existsSync('/run/buildkit/buildkitd.sock')) {
 | 
			
		||||
      throw new Error('buildkitd socket not found after 3s timeout');
 | 
			
		||||
      throw new Error('buildkitd socket not found after 5s timeout');
 | 
			
		||||
    }
 | 
			
		||||
    return {addr: buildkitdAddr, buildId: buildResponse?.docker_build_id, exposeId: exposeId};
 | 
			
		||||
  } catch (error) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue