mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-11-04 03:29:55 +00:00 
			
		
		
		
	local-build: Fix .docker ownership before build-payload
The permissions on .docker/buildx/activity/default are regularly broken by us passing docker.sock + $HOME/.docker to a container running as root and then using buildx inside. Fixup ownership before executing docker commands. Fixes: #8027 Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
		@@ -25,6 +25,8 @@ arch=$(uname -m)
 | 
				
			|||||||
[ "$arch" = "x86_64" ] && arch="amd64"
 | 
					[ "$arch" = "x86_64" ] && arch="amd64"
 | 
				
			||||||
IMAGE_TAG="${REGISTRY}:kata-containers-$(git rev-parse HEAD)-${arch}"
 | 
					IMAGE_TAG="${REGISTRY}:kata-containers-$(git rev-parse HEAD)-${arch}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sudo chown -R $USER $HOME/.docker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Building the image"
 | 
					echo "Building the image"
 | 
				
			||||||
docker build --tag ${IMAGE_TAG} .
 | 
					docker build --tag ${IMAGE_TAG} .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user