mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-21 01:13:56 +00:00
Revert "packaging: Use existing image for the kata-deploy-build"
This reverts commit c1aac0cdea
.
The reason this has to be reverted is because we cannot cache an image
that has a specific user, uid, gid, docker_host_id, and expect that to
work equally on different machines. Unfortunately, this is one of the
images that cannot be cached at all.
This commit is contained in:
parent
959dc3226b
commit
c3cb65d0bb
@ -16,8 +16,6 @@ kata_deploy_create="${script_dir}/kata-deploy-binaries.sh"
|
|||||||
uid=$(id -u ${USER})
|
uid=$(id -u ${USER})
|
||||||
gid=$(id -g ${USER})
|
gid=$(id -g ${USER})
|
||||||
|
|
||||||
source "${script_dir}/../../scripts/lib.sh"
|
|
||||||
|
|
||||||
if [ "${script_dir}" != "${PWD}" ]; then
|
if [ "${script_dir}" != "${PWD}" ]; then
|
||||||
ln -sf "${script_dir}/build" "${PWD}/build"
|
ln -sf "${script_dir}/build" "${PWD}/build"
|
||||||
fi
|
fi
|
||||||
@ -39,9 +37,7 @@ if [ ! -d "$HOME/.docker" ]; then
|
|||||||
remove_dot_docker_dir=true
|
remove_dot_docker_dir=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
container_image="${CC_BUILDER_REGISTRY}:build-kata-deploy-$(get_last_modification ${kata_dir} ${script_dir})"
|
docker build -q -t build-kata-deploy \
|
||||||
|
|
||||||
docker pull "${container_image}" || docker build -q -t "${container_image}" \
|
|
||||||
--build-arg IMG_USER="${USER}" \
|
--build-arg IMG_USER="${USER}" \
|
||||||
--build-arg UID=${uid} \
|
--build-arg UID=${uid} \
|
||||||
--build-arg GID=${gid} \
|
--build-arg GID=${gid} \
|
||||||
@ -64,7 +60,7 @@ docker run \
|
|||||||
-v "${kata_dir}:${kata_dir}" \
|
-v "${kata_dir}:${kata_dir}" \
|
||||||
--rm \
|
--rm \
|
||||||
-w ${script_dir} \
|
-w ${script_dir} \
|
||||||
"${container_image}" "${kata_deploy_create}" $@
|
build-kata-deploy "${kata_deploy_create}" $@
|
||||||
|
|
||||||
if [ $remove_dot_docker_dir == true ]; then
|
if [ $remove_dot_docker_dir == true ]; then
|
||||||
rm -rf "$HOME/.docker"
|
rm -rf "$HOME/.docker"
|
||||||
|
Loading…
Reference in New Issue
Block a user