@@ -4,6 +4,7 @@ FROM ubuntu:18.04
4
4
# The Rust toolchain layer will get updated most frequently, but we could keep the system
5
5
# dependencies layer intact for much longer.
6
6
7
+ ARG RUST_TOOLCHAIN="1.32.0"
7
8
ARG TMP_BUILD_DIR=/tmp/build
8
9
ARG FIRECRACKER_SRC_DIR="/firecracker"
9
10
ARG FIRECRACKER_BUILD_DIR="$FIRECRACKER_SRC_DIR/build"
@@ -44,6 +45,7 @@ RUN apt-get update \
44
45
python3-dev \
45
46
python3-pip \
46
47
python3-venv \
48
+ xz-utils \
47
49
zlib1g-dev \
48
50
&& python3 -m pip install \
49
51
setuptools \
@@ -60,12 +62,21 @@ RUN apt-get update \
60
62
requests \
61
63
requests-unixsocket \
62
64
retry \
65
+ # install cross-compiled fdt library
66
+ && mkdir "$TMP_BUILD_DIR" \
67
+ && cd "$TMP_BUILD_DIR" \
68
+ && curl -LO http://ftp.de.debian.org/debian/pool/main/d/device-tree-compiler/libfdt-dev_1.4.7-3_arm64.deb \
69
+ && ar x libfdt-dev_1.4.7-3_arm64.deb \
70
+ && tar -xf data.tar.xz \
71
+ && cp usr/lib/aarch64-linux-gnu/libfdt.a /usr/lib/aarch64-linux-gnu/libfdt.a \
72
+ && cd / \
73
+ && rm -rf "$TMP_BUILD_DIR" \
63
74
&& rm -rf /var/lib/apt/lists/*
64
75
65
76
# Install the Rust toolchain
66
77
#
67
78
RUN mkdir "$TMP_BUILD_DIR" \
68
- && curl https://sh.rustup.rs -sSf | sh -s -- -y \
79
+ && curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN" \
69
80
&& rustup target add x86_64-unknown-linux-musl \
70
81
&& rustup target add aarch64-unknown-linux-musl \
71
82
&& rustup component add rustfmt \
0 commit comments