Skip to content

Commit cb02d82

Browse files
committed
build static pdeathsigger
1 parent 734538a commit cb02d82

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

executable.Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ RUN ./phpspy_build.sh
7474
# async-profiler glibc
7575
FROM centos${AP_BUILDER_CENTOS} AS async-profiler-builder-glibc
7676
WORKDIR /tmp
77-
COPY scripts/async_profiler_env_glibc.sh scripts/fix_centos7.sh ./
77+
COPY scripts/async_profiler_env_glibc.sh scripts/fix_centos7.sh scripts/pdeathsigger.c ./
7878
RUN if grep -q "CentOS Linux 7" /etc/os-release ; then \
7979
./fix_centos7.sh; \
8080
fi
81-
RUN ./async_profiler_env_glibc.sh
81+
RUN ./async_profiler_env_glibc.sh && \
82+
gcc -static -o pdeathsigger pdeathsigger.c
8283

8384
COPY scripts/async_profiler_build_shared.sh .
8485
RUN ./async_profiler_build_shared.sh
@@ -212,9 +213,6 @@ RUN ./node_builder_glibc_env.sh
212213
COPY scripts/build_node_package.sh .
213214
RUN ./build_node_package.sh
214215

215-
COPY scripts/pdeathsigger.c .
216-
RUN gcc -o pdeathsigger pdeathsigger.c
217-
218216
# needed for hadolint
219217
WORKDIR /app
220218
USER 1001
@@ -260,12 +258,12 @@ COPY --from=async-profiler-builder-glibc /usr/bin/xargs gprofiler/resources/php/
260258

261259
COPY --from=async-profiler-builder-glibc /tmp/async-profiler/build/bin/asprof gprofiler/resources/java/asprof
262260
COPY --from=async-profiler-builder-glibc /tmp/async-profiler/build/async-profiler-version gprofiler/resources/java/async-profiler-version
261+
COPY --from=async-profiler-builder-glibc /tmp/pdeathsigger gprofiler/resources/pdeathsigger
263262
COPY --from=async-profiler-centos-min-test-glibc /libasyncProfiler.so gprofiler/resources/java/glibc/libasyncProfiler.so
264263
COPY --from=async-profiler-builder-musl /tmp/async-profiler/build/lib/libasyncProfiler.so gprofiler/resources/java/musl/libasyncProfiler.so
265264
COPY --from=node-package-builder-musl /tmp/module_build gprofiler/resources/node/module/musl
266265
COPY --from=node-package-builder-glibc /tmp/module_build gprofiler/resources/node/module/glibc
267266

268-
COPY --from=node-package-builder-glibc /tmp/pdeathsigger gprofiler/resources/pdeathsigger
269267

270268
COPY --from=burn-builder /tmp/burn/burn gprofiler/resources/burn
271269

0 commit comments

Comments
 (0)