You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ docker run jestefane/php-dev:7.2-cli-1.1.0 hello-world.php
61
+
$ docker run jestefane/php-dev:7.2-cli-1.1.1 hello-world.php
62
62
63
63
# or using one of the provided shortcuts
64
64
$ php-7.2-cli hello-world.php
65
65
```
66
66
67
+
### FPM
68
+
69
+
**Images names**:
70
+
71
+
-`jestefane/php-dev:5.5-fpm-1.1.1`
72
+
-`jestefane/php-dev:5.6-fpm-1.1.1`
73
+
-`jestefane/php-dev:7.0-fpm-1.1.1`
74
+
-`jestefane/php-dev:7.1-fpm-1.1.1`
75
+
-`jestefane/php-dev:7.2-fpm-1.1.1`
76
+
77
+
**Shortcuts**: [`php-fpm`][php-fpm-ref]
78
+
79
+
**Example**:
80
+
81
+
```bash
82
+
$ docker run jestefane/php-dev:7.2-fpm-1.1.1 hello-world.php
83
+
84
+
# or using one of the provided shortcuts
85
+
$ php-7.2-fpm hello-world.php
86
+
```
87
+
67
88
## Shortcuts
68
89
69
90
> **Note**: Only tested on some distros of Linux and Mac OS. But hey! It's tested ;)
@@ -90,6 +111,20 @@ This generates `bash` scripts in the `scripts` directory (via. [Script Template]
90
111
91
112
For more info on the `shortcuts` task, please checkout the [Makefile command reference][shortcuts-make].
92
113
114
+
#### Aliasing your Preferred Version Shortucts
115
+
116
+
Optionally, you can alias your preferred shortcuts by adding them to your `~/.bash_profile`:
117
+
118
+
```sh
119
+
# Aliases for the jestefane/php-dev preferred versions
120
+
alias php="php-7.2-cli"
121
+
alias composer="composer-7.2"
122
+
```
123
+
124
+
> **Note**: this is not a perfect replacement for installing PHP on your system.
125
+
126
+
> After saving your `.bash_profile`, don't forget to source your changes (`. ~/.bash_profile`) for them to take effect. Alternatively open a new Terminal session.
127
+
93
128
#### Script Templates
94
129
95
130
You'll notice that the directory that should contain the scripts doesn't exist; that's because you first need to generate them. This is automatically done prior to creating the symlinks. But if you've deleted a script or changed the templates in some way, you can regenerate scripts with:
@@ -105,48 +140,58 @@ For more info on the `scripts` task [Makefile command reference][scripts-make].
105
140
106
141
#### PHP CLI
107
142
108
-
**Images**: [All respective versions of the PHP CLI variant][cli]
143
+
Images: [All respective versions of the PHP CLI variant][cli]
|`SOURCE_BRANCH`| Appended to the image name | Repository's current version: `1.1.0`| Any `string` value |
171
+
|`SOURCE_BRANCH`| Appended to the image name | Repository's current version: `1.1.1`| Any `string` value |
172
+
|`DOCKER_REPO`| The Dockerhub repository to perform the tasks against |`jestefane/php-dev`| A Dockerhub repository |
173
+
|`DOCKER_TAG`| A combinaison of one PHP version and one PHP variant to perform a task only one image (for example `7.1-cli`) | Empty | Any `PHP_VERSION`-`PHP_VARIANT` combinaison |
129
174
|`PHP_VERSIONS`| Space separated list of PHP versions to perform a task on |`5.5 5.6 7.0 7.1 7.2`| Any combination from `5.5`, `5.6`, `7.0`, `7.1`, `7.2`|
130
-
|`PHP_VARIANTS`| Space separated list of Docker build variants to perform a task on |`cli`|`cli`|
175
+
|`PHP_VARIANTS`| Space separated list of Docker build variants to perform a task on |`cli fpm`|`cli`, `fpm`|
131
176
|`BIN_DIR`| Directory in your `PATH` where you would like to symlink the scripts |`/usr/local/bin`| Any path on your system. Preferaby one already in your `PATH`|
132
177
|`SCRIPTS_DIR`| Directory where the scripts are generated (or removed). Relative to the repository's root |`scripts`| Any path on your system |
133
178
134
179
> **Note**: When overriding space separated values from the CLI, you have to escape spaces. For example in `bash` you use `\`:
135
180
>
136
181
> ```sh
137
-
> $ make build PHP_VERSIONS=7.0\ 7.1\ 7.2
182
+
> $ make build PHP_VERSIONS=7.0\ 7.1\ 7.2 PHP_VARIANTS=cli\ fpm
138
183
>```
139
184
140
185
### Tasks
141
186
142
187
#### Build the Images
143
188
144
-
Locally builds all images from all possible combinations of `PHP_VERSIONS` and `PHP_VARIANTS`. `SOURCE_BRANCH` is appended to the image name.
189
+
Locally builds all images from all possible combinations of `PHP_VERSIONS` and `PHP_VARIANTS`. `SOURCE_BRANCH` is appended to the image name. The `DOCKER_TAG` is used to target a specific PHP version and variant.
145
190
146
191
**Command:**
147
192
148
193
```sh
149
-
$ make build [PHP_VERSIONS=] [PHP_VARIANTS=] [SOURCE_BRANCH=]
194
+
$ make build [PHP_VERSIONS=] [PHP_VARIANTS=] [SOURCE_BRANCH=] [DOCKER_TAG=] [DOCKER_REPO=]
150
195
```
151
196
152
197
#### Remove the Images
@@ -156,7 +201,7 @@ Remove all locally cached images from all possible combinations of `PHP_VERSIONS
156
201
**Command:**
157
202
158
203
```sh
159
-
$ make rm_build [PHP_VERSIONS=] [PHP_VARIANTS=] [SOURCE_BRANCH=]
204
+
$ make rm_build [PHP_VERSIONS=] [PHP_VARIANTS=] [SOURCE_BRANCH=] [DOCKER_REPO=]
160
205
```
161
206
162
207
#### Rebuild the Images
@@ -209,6 +254,18 @@ This task removes this repository's scripts' symlinks from the `BIN_DIR`.
209
254
$ make rm_shortcuts [PHP_VERSIONS=] [PHP_VARIANTS=] [BIN_DIR=]
210
255
```
211
256
257
+
#### Post Push
258
+
259
+
Pushes the images to Dockerhub.
260
+
261
+
> Truly, only used when developing to make sure that the Autobuild `post_push` hook works properly.
262
+
263
+
**Command:**
264
+
265
+
```sh
266
+
make post_push [PHP_VERSIONS=] [PHP_VARIANTS=] [SOURCE_BRANCH=] [DOCKER_TAG=] [DOCKER_REPO=]
267
+
```
268
+
212
269
#### Remove Dangling Volumes and Images
213
270
214
271
> **Warning**: Running this task will remove **any** dangling volume and image on your system; not just the ones provided.
0 commit comments