mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-16 07:05:14 +00:00
packaging: Fix kata-deploy-binaries-in-docker.sh with podman
Instad of bailing out whenever the docker group doesn't exist, just consider podman is being used, and set the docker_gid to the user's gid. Also, let's ensure to pass `--privileged` to the container, so `/run/podman/podman.socket` (which is what `/var/run/docker.sock` points to) can be passed to the container. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
07e76c7392
commit
411888796b
@ -23,7 +23,7 @@ fi
|
||||
# This is the gid of the "docker" group on host. In case of docker in docker builds
|
||||
# for some of the targets (clh builds from source), the nested container user needs to
|
||||
# be part of this group.
|
||||
docker_gid=$(getent group docker | cut -d: -f3 || { echo >&2 "Missing docker group, docker needs to be installed" && false; })
|
||||
docker_gid=$(getent group docker | cut -d: -f3 || { echo >&2 "Missing docker group, probably podman is being used" && echo "${gid}"; })
|
||||
|
||||
# If docker gid is the effective group id of the user, do not pass it as
|
||||
# an additional group.
|
||||
@ -45,6 +45,7 @@ docker build -q -t build-kata-deploy \
|
||||
"${script_dir}/dockerbuild/"
|
||||
|
||||
docker run \
|
||||
--privileged \
|
||||
-v $HOME/.docker:/root/.docker \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
--user ${uid}:${gid} \
|
||||
|
Loading…
Reference in New Issue
Block a user