Skip to content

Commit dab1e67

Browse files
committed
Switch to trafex/php-nginx repository
1 parent 8f3920f commit dab1e67

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

README.md

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Docker PHP-FPM 8.0 & Nginx 1.18 on Alpine Linux
22
Example PHP-FPM 8.0 & Nginx 1.18 setup for Docker, build on [Alpine Linux](https://www.alpinelinux.org/).
3-
The image is only +/- 35MB large.
3+
The image is only +/- 40MB large.
44

55
Repository: https://github.com/TrafeX/docker-php-nginx
66

77

88
* Built on the lightweight and secure Alpine Linux distribution
9-
* Very small Docker image size (+/-35MB)
9+
* Very small Docker image size (+/-40MB)
1010
* Uses PHP 8.0 for better performance, lower CPU usage & memory footprint
1111
* Optimized for 100 concurrent users
1212
* Optimized to only use resources when there's traffic (by using PHP-FPM's on-demand PM)
@@ -15,47 +15,46 @@ Repository: https://github.com/TrafeX/docker-php-nginx
1515
* Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs
1616

1717

18-
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/alpine-nginx-php7.svg)](https://hub.docker.com/r/trafex/alpine-nginx-php7/)
19-
[![Docker image layers](https://images.microbadger.com/badges/image/trafex/alpine-nginx-php7.svg)](https://microbadger.com/images/trafex/alpine-nginx-php7)
18+
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/php-nginx.svg)](https://hub.docker.com/r/trafex/php-nginx/)
2019
![nginx 1.18.0](https://img.shields.io/badge/nginx-1.18-brightgreen.svg)
2120
![php 8.0](https://img.shields.io/badge/php-8.0-brightgreen.svg)
2221
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)
2322

24-
### Breaking changes (26/01/2019)
23+
### Docker Hub repository name change
24+
Since we switched to PHP8 the repository name [trafex/alpine-nginx-php7](https://hub.docker.com/r/trafex/alpine-nginx-php7) didn't make sense anymore.
25+
Because you can't change the name of the repository on Docker Hub I created a new one.
2526

26-
Please note that the new builds since 26/01/2019 are exposing a different port to access Nginx.
27-
To be able to run Nginx as a non-privileged user, the port it's running on needed
28-
to change to a non-privileged port (above 1024).
27+
From now on this image can be pulled from Docker Hub under the name [trafex/php-nginx](https://hub.docker.com/r/trafex/php-nginx).
2928

30-
The last build of the old version that exposed port 80 was `trafex/alpine-nginx-php7:ba1dd422`
29+
The old repository will still be available and kept up to date with [trafex/php-nginx](https://hub.docker.com/r/trafex/php-nginx).
3130

3231
## Usage
3332

3433
Start the Docker container:
3534

36-
docker run -p 80:8080 trafex/alpine-nginx-php7
35+
docker run -p 80:8080 trafex/php-nginx
3736

3837
See the PHP info on http://localhost, or the static html page on http://localhost/test.html
3938

4039
Or mount your own code to be served by PHP-FPM & Nginx
4140

42-
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/alpine-nginx-php7
41+
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/php-nginx
4342

4443
## Configuration
4544
In [config/](config/) you'll find the default configuration files for Nginx, PHP and PHP-FPM.
4645
If you want to extend or customize that you can do so by mounting a configuration file in the correct folder;
4746

4847
Nginx configuration:
4948

50-
docker run -v "`pwd`/nginx-server.conf:/etc/nginx/conf.d/server.conf" trafex/alpine-nginx-php7
49+
docker run -v "`pwd`/nginx-server.conf:/etc/nginx/conf.d/server.conf" trafex/php-nginx
5150

5251
PHP configuration:
5352

54-
docker run -v "`pwd`/php-setting.ini:/etc/php7/conf.d/settings.ini" trafex/alpine-nginx-php7
53+
docker run -v "`pwd`/php-setting.ini:/etc/php7/conf.d/settings.ini" trafex/php-nginx
5554

5655
PHP-FPM configuration:
5756

58-
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php7/php-fpm.d/server.conf" trafex/alpine-nginx-php7
57+
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php7/php-fpm.d/server.conf" trafex/php-nginx
5958

6059
_Note; Because `-v` requires an absolute path I've added `pwd` in the example to return the absolute path to the current directory_
6160

@@ -64,8 +63,8 @@ _Note; Because `-v` requires an absolute path I've added `pwd` in the example to
6463

6564
If you need [Composer](https://getcomposer.org/) in your project, here's an easy way to add it.
6665

67-
```dockerfile
68-
FROM trafex/alpine-nginx-php7:latest
66+
```Dockerfile
67+
FROM trafex/php-nginx:latest
6968

7069
# Install composer from the official image
7170
COPY --from=composer /usr/bin/composer /usr/bin/composer
@@ -93,6 +92,6 @@ RUN composer install \
9392

9493
# continue stage build with the desired image and copy the source including the
9594
# dependencies downloaded by composer
96-
FROM trafex/alpine-nginx-php7
95+
FROM trafex/php-nginx
9796
COPY --chown=nginx --from=composer /app /var/www/html
9897
```

0 commit comments

Comments
 (0)