From a7bfe20d7a626afc5dd3b304d82c59f4d3631348 Mon Sep 17 00:00:00 2001 From: Zifei Tong Date: Sat, 21 Sep 2024 18:38:38 -0700 Subject: [PATCH] Add magic-trace --- ubuntu-devpack.Containerfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ubuntu-devpack.Containerfile b/ubuntu-devpack.Containerfile index f3da24c..c5446fb 100644 --- a/ubuntu-devpack.Containerfile +++ b/ubuntu-devpack.Containerfile @@ -11,6 +11,7 @@ ARG TARGETARCH ARG BAZELISK_URL=https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux- ARG BUILDIFIER_URL=https://github.com/bazelbuild/buildtools/releases/latest/download/buildifier-linux- ARG BUILDOZER_URL=https://github.com/bazelbuild/buildtools/releases/latest/download/buildozer-linux- +ARG MAGIC_TRACE_URL=https://github.com/janestreet/magic-trace/releases/latest/download/magic-trace ENV GOPATH=/go @@ -37,6 +38,9 @@ RUN go install github.com/google/pprof@latest # Install doggo RUN go install github.com/mr-karan/doggo/cmd/doggo@v1.0.4 +# Install magic-trace +RUN curl --proto '=https' --tlsv1.3 -sSfL ${MAGIC_TRACE_URL} > magic-trace + # ===== Main Image ===== FROM docker.io/library/ubuntu:24.04 as ubuntu-devpack LABEL name="ubuntu-debpack" version="24.04" @@ -48,16 +52,19 @@ RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-lan RUN userdel --remove ubuntu # Install packages +ARG DEBIAN_FRONTEND=noninteractive + COPY extra-packages / RUN apt-get update && \ - yes | /usr/local/sbin/unminimize && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install \ - ubuntu-minimal ubuntu-standard $(grep -v '^#' extra-packages | xargs) + apt-get install -y unminimize && \ + yes | unminimize && \ + apt-get -y install ubuntu-minimal ubuntu-standard $(grep -v '^#' extra-packages | xargs) RUN rm /extra-packages RUN ln -s "$(find /usr/lib/linux-tools/*/perf | head -1)" /usr/local/bin/perf -COPY --from=builder --chmod=755 bazel buildifier buildozer /go/bin/pprof \ +COPY --from=builder --chmod=755 bazel buildifier buildozer magic-trace \ + /go/bin/pprof \ /perf_data_converter/bazel-bin/src/perf_to_profile \ /go/bin/doggo \ /usr/local/bin/