google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)

Home Page:https://www.perfetto.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI build failed in Docker python:3

ylz-at opened this issue · comments

Here is my Dockerfile,

FROM python:3
WORKDIR /opt/perfetto
COPY . .
RUN tools/install-build-deps --ui
RUN tools/gn gen out/debug --args='is_debug=true'
RUN tools/ninja -C out/debug ui

ENTRYPOINT ['./ui/run-dev-server']

build failed with error log,

52/59  python3 ../../tools/gen_ui_imports ../../ui/src/tracks --out ../../ui/src/gen/al
--out (/opt/perfetto/ui/src/gen/all_tracks.ts) parent directory (/opt/perfetto/ui/src/gen) must exist

Oh yeah should point to the other docs

Nice.

I fixed the build issue by creating symlinks before ui/build.
This might be something related to me using Docker for Windows.

FROM python:3
WORKDIR /opt/perfetto
COPY . .

RUN mkdir -p out/ui
RUN rm ui/src/gen
RUN ln -s out/ui ui/out
RUN ln -s ui/out/tsc/gen ui/src/gen

RUN tools/install-build-deps --ui
RUN ui/build

ENTRYPOINT ["./ui/run-dev-server", "--serve-host", "0.0.0.0"]