mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
kata-static: Add sudo while building cloud hypervisor docker image
If we want to run the build.sh by using a user this is failing by saying that `failed to dial gRPC: cannot connect to the Docker daemon... /var/run/docker.sock: connect: permission denied`. This PR fixes that issue. Fixes #889 Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
parent
d1cd6c3e2e
commit
ca6df8510c
@ -11,7 +11,7 @@ set -o pipefail
|
|||||||
script_dir=$(dirname $(readlink -f "$0"))
|
script_dir=$(dirname $(readlink -f "$0"))
|
||||||
docker_image="cloud-hypervisor-builder"
|
docker_image="cloud-hypervisor-builder"
|
||||||
|
|
||||||
docker build -t "${docker_image}" "${script_dir}"
|
sudo docker build -t "${docker_image}" "${script_dir}"
|
||||||
|
|
||||||
if test -t 1; then
|
if test -t 1; then
|
||||||
USE_TTY="-ti"
|
USE_TTY="-ti"
|
||||||
@ -20,7 +20,7 @@ else
|
|||||||
echo "INFO: not tty build"
|
echo "INFO: not tty build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker run \
|
sudo docker run \
|
||||||
--rm \
|
--rm \
|
||||||
-v "$(pwd):/$(pwd)" \
|
-v "$(pwd):/$(pwd)" \
|
||||||
-w "$(pwd)" \
|
-w "$(pwd)" \
|
||||||
|
Loading…
Reference in New Issue
Block a user