-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a
sysroot
flavour of the Oak Containers system image
The idea is to use the .tar that is generated by this as the sysroot for bazel in the future. This is not in use right now, though, as I've yet to set up the toolchain that'd use this sysroot. Bug: b/364256351 Change-Id: If78714221b3ff2999fd5bd58ad7f15b78950010a
- Loading branch information
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# The expectation is that we build `base_image.Dockerfile` before this one. | ||
# hadolint ignore=DL3007 | ||
FROM oak-containers-sysimage-base:latest | ||
|
||
ARG LINUX_KERNEL_VERSION | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
RUN apt-get --yes update \ | ||
&& apt-get install --yes --no-install-recommends \ | ||
libc6-dev flex bison build-essential bc cpio libncurses5-dev libelf-dev libssl-dev dwarves debhelper-compat rsync \ | ||
kmod \ | ||
# Cleanup | ||
&& apt-get clean \ | ||
&& rm --recursive --force /var/lib/apt/lists/* | ||
|
||
COPY target/linux-${LINUX_KERNEL_VERSION}.tar.xz /tmp | ||
COPY target/minimal.config /tmp | ||
|
||
RUN tar --directory=/tmp --extract --file /tmp/linux-${LINUX_KERNEL_VERSION}.tar.xz \ | ||
&& cp /tmp/minimal.config /tmp/linux-${LINUX_KERNEL_VERSION}/.config \ | ||
&& make --directory=/tmp/linux-${LINUX_KERNEL_VERSION} bindeb-pkg \ | ||
&& dpkg --install /tmp/linux-headers-${LINUX_KERNEL_VERSION}_${LINUX_KERNEL_VERSION}-1_amd64.deb \ | ||
&& rm -rf /tmp/linux-${LINUX_KERNEL_VERSION} /tmp/linux-${LINUX_KERNEL_VERSION}.tar.xz /tmp/minimal.config | ||
|