https://github.com/rimelek/phar-examples
Usage examples of PHP Phar Archives
https://github.com/rimelek/phar-examples
docker docker-image php php-phars
Last synced: 5 months ago
JSON representation
Usage examples of PHP Phar Archives
- Host: GitHub
- URL: https://github.com/rimelek/phar-examples
- Owner: rimelek
- License: mit
- Created: 2017-09-16T14:36:31.000Z (almost 9 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-18T22:21:43.000Z (over 1 year ago)
- Last Synced: 2025-03-28T10:50:25.664Z (about 1 year ago)
- Topics: docker, docker-image, php, php-phars
- Language: Shell
- Homepage:
- Size: 112 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PHP Phar example scripts
========================
About the project
-----------------
This project contains examples how to use PHP Phar archives.
Under "[examples](https://github.com/rimelek/phar-examples/tree/master/examples)",
you can find more folders with examples. Each folder contains a README.md.
You can read it on GitHub or you can download this PHP application from GitHub
or as a Docker image from [Docker Hub](https://hub.docker.com/r/rimelek/phar-examples/).
When you run it, you will see a dashboard where you can run the examples,
rebuild them and read the details of the chosen example.

Run it in Docker container
--------------------------
```bash
docker run -it --rm -p 8080:80 rimelek/phar-examples
```
or in the background:
```bash
docker run -d -p 8080:80 --name phar-examples rimelek/phar-examples
```
Use a volume if you want to keep the already built examples
```bash
docker run -d -p 8080:80 --name phar-examples -v phar-examples_output:/var/www/html/output rimelek/phar-examples
```
If you clone the repository, you can also use the `run.sh` to make the container available on port 8080
```bash
./run.sh
```
If port 8080 is not available, you can pass another port:
```bash
./run.sh 9090
```
or save a `.env` file with an exported port
```bash
export PORT=9090
```
Note: Export is necessary for `run.sh` to show the URL which can also become clickable in some IDE-s like PHPStorm.
Supported tags
--------------
**Note:** The below table can also contain planned tags that are waiting for to be built and pushed to Docker Hub.
For more accurate information visit the [description on Docker Hub](https://hub.docker.com/r/rimelek/phar-examples/)
which is updated the new images were pushed.
| Dockerfile | Major | Minor | Patch |
|:-----------------------------------------------------------------------:|:-----:|:-----:|:-----:|
| [Link](https://github.com/rimelek/phar-examples/blob/v2.0.1/Dockerfile) | 2 | 2.0 | 2.0.1 |
| [Link](https://github.com/rimelek/phar-examples/blob/v1.0.0/Dockerfile) | 1 | 1.0 | 1.0.0 |