You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			20 lines
		
	
	
		
			396 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			20 lines
		
	
	
		
			396 B
		
	
	
	
		
			Bash
		
	
| #!/usr/bin/env bash
 | |
| 
 | |
| set -e
 | |
| 
 | |
| : ${BUILDX_CMD=docker buildx}
 | |
| : ${TMUX=}
 | |
| 
 | |
| function clean {
 | |
|   docker rmi $iid
 | |
| }
 | |
| 
 | |
| iid=buildx-shell
 | |
| (set -x ; ${BUILDX_CMD} build --output "type=docker,name=$iid" --target shell .)
 | |
| trap clean EXIT
 | |
| SSH=
 | |
| if [ -n "$MOUNT_SSH_AUTH_SOCK" ]; then
 | |
|   SSH="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK"
 | |
| fi
 | |
| docker run $SSH -it --privileged --rm -e TMUX_ENTRYPOINT=$TMUX $iid
 |