mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-14 15:44:58 +00:00
packaging: Eliminate TTY_OPT and NO_TTY variables in kata-deploy
NO_TTY configured whether to add the -t option to docker run. It makes no
sense for the caller to configure this, since whether you need it depends
on the commands you're running. Since the point here is to run
non-interactive build scripts, we don't need -t, or -i either.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit 1ed7da8fc7
)
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
8f67f9e384
commit
8fa64e011d
@ -16,7 +16,7 @@ endef
|
|||||||
kata-tarball: | all-parallel merge-builds
|
kata-tarball: | all-parallel merge-builds
|
||||||
|
|
||||||
all-parallel:
|
all-parallel:
|
||||||
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) NO_TTY="true" V=
|
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) V=
|
||||||
|
|
||||||
all: cloud-hypervisor-tarball \
|
all: cloud-hypervisor-tarball \
|
||||||
firecracker-tarball \
|
firecracker-tarball \
|
||||||
|
@ -16,10 +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})
|
||||||
|
|
||||||
TTY_OPT="-i"
|
|
||||||
NO_TTY="${NO_TTY:-false}"
|
|
||||||
[ -t 1 ] && [ "${NO_TTY}" == "false" ] && TTY_OPT="-it"
|
|
||||||
|
|
||||||
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
|
||||||
@ -34,7 +30,7 @@ docker build -q -t build-kata-deploy \
|
|||||||
--build-arg GID=${gid} \
|
--build-arg GID=${gid} \
|
||||||
"${script_dir}/dockerbuild/"
|
"${script_dir}/dockerbuild/"
|
||||||
|
|
||||||
docker run ${TTY_OPT} \
|
docker run \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
--user ${uid}:${gid} \
|
--user ${uid}:${gid} \
|
||||||
--env USER=${USER} -v "${kata_dir}:${kata_dir}" \
|
--env USER=${USER} -v "${kata_dir}:${kata_dir}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user