mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
osbuilder: Re-enable building the agent in Docker
or Podman. This is a partial revert of
76c18aa345
. The rationale behind that
commit was the fact that the agent could not be built on Alpine, and
then this capability was removed altogether. The issue in Alpine has
since been resolved (see
https://github.com/kata-containers/osbuilder/issues/386). At the same
time, this ensures being able to run a glibc agent on hosts with distros
more recent than the osbuilder distro used (i.e. as of now, when you
build the agent on the host, and its glibc is newer than the one used in
the guest, the agent may encounter unresolved symbols).
Fixes #2398
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
parent
baf4784a29
commit
eb5dd76e9d
@ -7,7 +7,23 @@ ARG IMAGE_REGISTRY=docker.io
|
|||||||
FROM ${IMAGE_REGISTRY}/alpine:3.13.5
|
FROM ${IMAGE_REGISTRY}/alpine:3.13.5
|
||||||
|
|
||||||
RUN apk update && apk add \
|
RUN apk update && apk add \
|
||||||
bash \
|
apk-tools-static \
|
||||||
curl \
|
autoconf \
|
||||||
coreutils \
|
automake \
|
||||||
binutils
|
bash \
|
||||||
|
binutils \
|
||||||
|
cmake \
|
||||||
|
coreutils \
|
||||||
|
curl \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
libc-dev \
|
||||||
|
libseccomp \
|
||||||
|
libseccomp-dev \
|
||||||
|
linux-headers \
|
||||||
|
m4 \
|
||||||
|
make \
|
||||||
|
musl \
|
||||||
|
musl-dev \
|
||||||
|
tar
|
||||||
|
@ -420,7 +420,6 @@ build_rootfs_distro()
|
|||||||
--env INSIDE_CONTAINER=1 \
|
--env INSIDE_CONTAINER=1 \
|
||||||
--env SECCOMP="${SECCOMP}" \
|
--env SECCOMP="${SECCOMP}" \
|
||||||
--env DEBUG="${DEBUG}" \
|
--env DEBUG="${DEBUG}" \
|
||||||
--env STAGE_PREPARE_ROOTFS=1 \
|
|
||||||
--env HOME="/root" \
|
--env HOME="/root" \
|
||||||
-v "${repo_dir}":"/kata-containers" \
|
-v "${repo_dir}":"/kata-containers" \
|
||||||
-v "${ROOTFS_DIR}":"/rootfs" \
|
-v "${ROOTFS_DIR}":"/rootfs" \
|
||||||
@ -429,6 +428,8 @@ build_rootfs_distro()
|
|||||||
$docker_run_args \
|
$docker_run_args \
|
||||||
${image_name} \
|
${image_name} \
|
||||||
bash /kata-containers/tools/osbuilder/rootfs-builder/rootfs.sh "${distro}"
|
bash /kata-containers/tools/osbuilder/rootfs-builder/rootfs.sh "${distro}"
|
||||||
|
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,10 +650,8 @@ main()
|
|||||||
prepare_overlay
|
prepare_overlay
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$STAGE_PREPARE_ROOTFS" == "" ]; then
|
init="${ROOTFS_DIR}/sbin/init"
|
||||||
init="${ROOTFS_DIR}/sbin/init"
|
setup_rootfs
|
||||||
setup_rootfs
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main $*
|
main $*
|
||||||
|
Loading…
Reference in New Issue
Block a user