mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-10-30 23:53:48 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			573 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			573 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| . $(dirname $0)/util
 | |
| 
 | |
| : ${TARGETPLATFORM=linux/amd64,linux/arm/v7,linux/arm64,darwin/amd64,windows/amd64,linux/ppc64le,linux/s390x}
 | |
| : ${CONTINUOUS_INTEGRATION=}
 | |
| : ${EXPORT_LOCAL=}
 | |
| 
 | |
| set -ex
 | |
| 
 | |
| exportFlag=""
 | |
| if [ -n "$EXPORT_LOCAL" ]; then
 | |
| 	exportFlag="--output=type=local,dest=$EXPORT_LOCAL"
 | |
| fi
 | |
| 
 | |
| progressFlag=""
 | |
| if [ "$CONTINUOUS_INTEGRATION" == "true" ]; then progressFlag="--progress=plain";
 | |
| fi
 | |
| 
 | |
| buildctl build $progressFlag --frontend=dockerfile.v0 --local context=. --local dockerfile=. --opt platform=$TARGETPLATFORM $exportFlag --opt target=binaries | 
