Skip to content

Commit

Permalink
feat(build_container): help musl-tools find headers
Browse files Browse the repository at this point in the history
This commit is an addition to the rust-vmm#97 PR and
helps musl-tools to find linux headers.

Signed-off-by: Egor Lazarchuk <[email protected]>
  • Loading branch information
ShadowCurse committed Jan 3, 2024
1 parent aec92fb commit df918ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:22.04
ARG RUST_TOOLCHAIN="1.72.0"
ARG ARCH

# Adding rust binaries to PATH.
ENV PATH="$PATH:/root/.cargo/bin"
Expand Down
6 changes: 6 additions & 0 deletions build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
# cleanup
apt-get clean && rm -rf /var/lib/apt/lists/*

# help musl-gcc find linux headers
cd /usr/include/$ARCH-linux-musl \
&& ln -s ../$ARCH-linux-gnu/asm asm \
&& ln -s ../linux linux \
&& ln -s ../asm-generic asm-generic

pip3 install --no-cache-dir pytest pexpect boto3 pytest-timeout && apt purge -y python3-pip

# Install rustup and a fixed version of Rust.
Expand Down

0 comments on commit df918ef

Please sign in to comment.