Skip to content

Commit

Permalink
Add magic-trace
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeitong committed Sep 22, 2024
1 parent b47ec12 commit a7bfe20
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ubuntu-devpack.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -37,6 +38,9 @@ RUN go install github.com/google/pprof@latest
# Install doggo
RUN go install github.com/mr-karan/doggo/cmd/[email protected]

# 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"
Expand All @@ -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/
Expand Down

0 comments on commit a7bfe20

Please sign in to comment.