Skip to content

Commit cff61c2

Browse files
committed
Added PHP 7.2
1 parent 9b5d527 commit cff61c2

File tree

10 files changed

+61
-3
lines changed

10 files changed

+61
-3
lines changed

Makefile

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION=1.0.0
2-
VERSIONS=5.5 5.6 7.0 7.1
2+
VERSIONS=5.5 5.6 7.0 7.1 7.2
33
GENERATED_DIR=generated
44
BUILDS_DIR=$(GENERATED_DIR)/builds
55
BINS_DIR=$(GENERATED_DIR)/bins
@@ -11,7 +11,7 @@ builds: templates
1111
do \
1212
cli=jestefane/php-dev:$$version-cli-$(VERSION); \
1313
echo Building $$cli; \
14-
docker build -t $$cli $(BUILDS_DIR)/$$version; \
14+
docker build -t $$cli $(BUILDS_DIR)/$$version-cli; \
1515
done; \
1616
}
1717

@@ -53,3 +53,10 @@ cp_bins:
5353
@chmod +x $(BINS_DIR)/*
5454
@cp $(BINS_DIR)/* $(BIN_DIR)
5555
@echo Copied bins into $(BIN_DIR)
56+
57+
symlink_bins:
58+
@chmod +x $(BINS_DIR)/*
59+
@cd $(BINS_DIR)
60+
@$(eval DIR := ${CURDIR}/$(BINS_DIR))
61+
@ln -s $(DIR)/* $(BIN_DIR)
62+
@echo Symlink bins from $(DIR) into $(BIN_DIR)

README.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,37 @@ docker run --rm -it \
5959
For simplicity , and to be able to use the tools normally, this repository contains binaries you can copy in `/usr/local/bin` (or anythwere in your `$PATH`).
6060

6161
```shell
62-
make cp_bins
62+
make symlink_bins # adds symlinks in /usr/local/bin
63+
```
64+
65+
Or if you prefer:
66+
67+
```shell
68+
make cp_bins # copies the bins into /usr/local/bin
6369
```
6470

6571
## Building images locally
6672

6773
```shell
6874
make builds
75+
```
76+
77+
## Rebuilding templates
78+
79+
```shell
80+
make templates
81+
```
82+
83+
## Adding a new PHP version
84+
85+
In Makefile, add the new version to `VERSIONS`. Then run
86+
87+
```shell
88+
make builds
89+
```
90+
91+
or run:
92+
93+
```shell
94+
make builds VERSIONS=7.2
6995
```

generated/bins/composer-5.5

100755100644
File mode changed.

generated/bins/composer-5.6

100755100644
File mode changed.

generated/bins/composer-7.0

100755100644
File mode changed.

generated/bins/composer-7.1

100755100644
File mode changed.

generated/bins/composer-7.2

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
docker run --rm -it -w=/app -v $(pwd):/app -v ~/.ssh:/root/.ssh -v $HOME/.composer-docker:/root/.composer jestefane/php-dev:7.2-cli-1.0.0 composer $@

generated/bins/php-cli-7.2

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
docker run --rm -it -w=/app -v $(pwd):/app jestefane/php-dev:7.2-cli-1.0.0 $@

generated/builds/7.2-cli/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM php:7.2-cli
2+
3+
RUN apt-get update && apt-get install -y unzip git
4+
5+
COPY php.ini /usr/local/etc/php/
6+
7+
# Install and enable xdebug and pdo mysql
8+
RUN pecl install xdebug \
9+
&& docker-php-ext-install pdo_mysql \
10+
&& docker-php-ext-enable xdebug pdo_mysql
11+
12+
# Install composer
13+
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
14+
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
15+
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
16+
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --snapshot \
17+
&& rm -f /tmp/composer-setup.*

generated/builds/7.2-cli/php.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Date]
2+
date.timezone = UTC

0 commit comments

Comments
 (0)