Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakzal/docker-symfony-intl
Docker images for testing the Symfony Intl Component
https://github.com/jakzal/docker-symfony-intl
docker docker-image icu intl php symfony
Last synced: 19 days ago
JSON representation
Docker images for testing the Symfony Intl Component
- Host: GitHub
- URL: https://github.com/jakzal/docker-symfony-intl
- Owner: jakzal
- License: mit
- Created: 2017-05-10T12:37:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T11:49:54.000Z (10 months ago)
- Last Synced: 2024-10-03T10:58:47.085Z (about 1 month ago)
- Topics: docker, docker-image, icu, intl, php, symfony
- Language: Dockerfile
- Size: 151 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker images for testing the Symfony Intl Component
Docker images for running tests of the Symfony Intl Component against various
ICU/Intl versions. These images are not meant to be used on production systems.## Supported versions
* PHP 8.1 - 8.3
* ICU 73.2 - 74.1For older PHP or ICU versions check out older [Docker image tags](https://hub.docker.com/repository/docker/jakzal/php-intl/tags).
## Usage
Images are tagged with a PHP version and an ICU release separated with a dash.
For example, the tag for `PHP 8.3` and `ICU 74.1` is `8.3-74.1`.```bash
docker run -it --rm \
-v `pwd`:/symfony -w /symfony \
jakzal/php-intl:8.3-74.1 \
./phpunit /symfony/src/Symfony/Component/Intl/Tests/
```To list all available tags run the following command (requires [jq](https://stedolan.github.io/jq/) to be installed):
```bash
curl -Ls 'https://registry.hub.docker.com/v2/repositories/jakzal/php-intl/tags?page_size=20' | jq '.results[].name' --raw-output | sort
```## Image development
### Building images
Build the latest PHP version with the latest ICU release:
```bash
make build
```Build the latest PHP version with a chosen ICU release:
```bash
make build ICU_VERSION=74.1
```Build a chosen PHP version with a chosen ICU release:
```bash
make build ICU_VERSION=74.1 PHP_VERSION=8.3
```## Running Symfony Intl tests
It's best to run these tests on a system that natively supports Docker.
If you're not a Linux desktop user, you can create a digitalocean droplet with little effort (or use other cloud provider):```bash
docker-machine create --driver digitalocean --digitalocean-access-token $DIGITAL_OCEAN_ACCESS_TOKEN \
--digitalocean-image "ubuntu-19-04-x64" \
--digitalocean-size "4gb" \
--digitalocean-region "lon1" \
symfony-intl
eval "$(docker-machine env symfony-intl)"
docker run --rm -it jakzal/php-intl:8.3-74.1 bash
```Clone the Symfony repository and switch to the branch you want to test:
```bash
git clone https://github.com/jakzal/symfony.git \
&& cd symfony \
&& git checkout icu-74.1 \
&& composer install
```Run all `intl-data` tests:
```bash
./phpunit --group intl-data
```Destroy the droplet when you're done:
```bash
docker-machine rm symfony-intl
```