Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/downl
&& sudo chmod +x /usr/local/bin/pie
```

> [!TIP]
> For usage in a Docker image build, we have a recommended usage example in
> [usage#example-of-pie-working-in-a-dockerfile](./docs/usage.md#example-of-pie-working-in-a-dockerfile).

## Using PIE

### Installing a single extension using PIE
Expand Down
7 changes: 7 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ Docker image. Note that, like Composer, you need something like `unzip`, the
[Zip](https://www.php.net/manual/en/book.zip.php) extension, or `git` to be
installed.

A quick summary of what the below example does:

- Mount PIE on `/usr/local/bin/pie` - this means PIE is only present at build time; it doesn't need to be in the runtime/final image
- Install `unzip` from apt; additional library dependencies for the extension could be added here
- Use `pie install` to install any relevant extension(s)
- Remove `unzip` and clear up `apt` lists

```Dockerfile
FROM php:8.4-cli

Expand Down
Loading