mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 13:38:26 +00:00
Merge pull request #6262 from jepio/jepio/initrd-dev-nodes
osbuilder: Include minimal set of device nodes in ubuntu initrd
This commit is contained in:
commit
44a780f262
@ -6,6 +6,8 @@ ARG IMAGE_REGISTRY=docker.io
|
||||
FROM ${IMAGE_REGISTRY}/ubuntu:@OS_VERSION@
|
||||
@SET_PROXY@
|
||||
|
||||
# makedev tries to mknod from postinst
|
||||
RUN [ -x /usr/bin/systemd-detect-virt ] || ( echo "echo docker" >/usr/bin/systemd-detect-virt && chmod +x /usr/bin/systemd-detect-virt )
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get --no-install-recommends -y install \
|
||||
@ -20,6 +22,7 @@ RUN apt-get update && \
|
||||
echo "gcc-$gcc_arch-linux-gnu libc6-dev-$libc_arch-cross")) \
|
||||
git \
|
||||
make \
|
||||
makedev \
|
||||
multistrap \
|
||||
musl-tools \
|
||||
protobuf-compiler
|
||||
|
@ -34,4 +34,10 @@ EOF
|
||||
|
||||
# Reduce image size and memory footprint by removing unnecessary files and directories.
|
||||
rm -rf $rootfs_dir/usr/share/{bash-completion,bug,doc,info,lintian,locale,man,menu,misc,pixmaps,terminfo,zsh}
|
||||
|
||||
# Minimal set of device nodes needed when AGENT_INIT=yes so that the
|
||||
# kernel can properly setup stdout/stdin/stderr for us
|
||||
pushd $rootfs_dir/dev
|
||||
MAKEDEV -v console tty ttyS null zero fd
|
||||
popd
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user