Skip to content

Commit

Permalink
Merge a493457 into a7d7cc8
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i authored Feb 14, 2022
2 parents a7d7cc8 + a493457 commit 9297d01
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.idea
.git
.gitignore
.github
.couscous
couscous.yml
.dockerignore
Dockerfile
.phpunit.result.cache
php-profiler.log
vendor
lsp
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
FROM php:8.0-cli

RUN apt-get update && apt-get install -y \
libffi-dev \
libzip-dev \
&& docker-php-ext-install ffi \
&& docker-php-ext-install pcntl \
&& docker-php-ext-install zip
&& docker-php-ext-install zip \
&& rm -rf /var/lib/apt/lists/*

COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN composer require sj-i/php-profiler

WORKDIR /app
COPY . .

RUN composer install --no-dev

ENTRYPOINT ["php", "php-profiler"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ If JIT is enabled at the target process, this information may be slightly inaccu
### Use in a docker container and target a process on host
```bash
$ docker build -t php-profiler .
$ docker run -it --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE --pid=host php-profiler:latest vendor/bin/php-profiler i:trace -p <pid of the target process or thread>
$ docker pull sjidev/php-profiler
$ docker run -it --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE --pid=host sjidev/php-profiler i:trace -p <pid of the target process or thread>
```
### Generate flamegraphs from traces
Expand Down

0 comments on commit 9297d01

Please sign in to comment.