mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 10:32:10 +00:00
We no longer need to build dependencies from source and provide them via pkg-config, this simplifies much of our builder container setup. As debian bullseye got promoted to stable, we can now also simplify further by just using bullseye stable instead of mixing stable and testing packages. BUG=b:181359683 TEST=./test_all Change-Id: I2ce61992d5cfe6eb5dc3f0ec61920dcc5455ca40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3141772 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com>
72 lines
2.2 KiB
Docker
72 lines
2.2 KiB
Docker
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Base image for crosvm_builder and crosvm_aarch64_builder containing basic
|
|
# devleopment environment for building rust.
|
|
|
|
FROM debian:bullseye
|
|
|
|
# Set timezone so apt-get won't try to prompt
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=US/Pacific
|
|
|
|
RUN apt-get update && apt-get install --yes --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
clang \
|
|
libclang-dev \
|
|
g++ \
|
|
gcc \
|
|
git \
|
|
jq \
|
|
libasound2-dev \
|
|
make \
|
|
meson \
|
|
nasm \
|
|
ninja-build \
|
|
openssh-client \
|
|
pkg-config \
|
|
protobuf-compiler \
|
|
python3 \
|
|
python3-setuptools \
|
|
rsync \
|
|
screen \
|
|
sudo
|
|
|
|
# This is a scratch volume for build files. It can be used to allow incremental
|
|
# builds between container runs.
|
|
# Note: This volume is optional if incremental builds are not required.
|
|
VOLUME /workspace/scratch
|
|
|
|
# This is where the chromiumos source tree will be mounted
|
|
VOLUME /workspace/src
|
|
|
|
# This is a volume to store additional logs for kokoro builds that are uploaded
|
|
# to sponge.
|
|
VOLUME /workspace/logs
|
|
|
|
# Install the current crosvm rust toolchain via rustup.
|
|
COPY rust-toolchain ./
|
|
RUN curl https://static.rust-lang.org/rustup/archive/1.24.3/x86_64-unknown-linux-gnu/rustup-init -sSf -o rustup-init \
|
|
&& echo "3dc5ef50861ee18657f9db2eeb7392f9c2a6c95c90ab41e45ab4ca71476b4338 rustup-init" | sha256sum --check \
|
|
&& chmod +x rustup-init \
|
|
&& ./rustup-init -y \
|
|
--profile minimal \
|
|
-c rustfmt,clippy \
|
|
--default-toolchain $(cat rust-toolchain)
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
# The bindgen tool is required to build a crosvm dependency.
|
|
RUN cargo install bindgen
|
|
|
|
# The mdbook and mdbook-mermaid tools are used to build the crosvm book.
|
|
RUN cargo install mdbook --no-default-features --version "^0.4.10"
|
|
RUN cargo install mdbook-mermaid --version "^0.8.3"
|
|
|
|
# Point cargo to store data on the scratch volume.
|
|
ENV CARGO_TARGET_DIR=/workspace/scratch/cargo_target
|
|
ENV CARGO_HOME=/workspace/scratch/cargo_home
|
|
|
|
# All commands will be executed in the crosvm src directory.
|
|
WORKDIR /workspace/src/crosvm
|