Alpine Linux based nginx and php7 container
1.2K
An alpine linux based docker container with nginx and php7 (fpm) inside. Also composer is already included.
Create your the docker-compose.yml in you project and paste these lines, or copy the content of docker-compose.demo.yml :
web:
image: mesa/alpine-nginx-php7:1.3.0
ports:
- "80:80"
volumes:
- "./var/www:/var/www"
then run
docker-compose up
and you are ready to go, just visit http://localhost and you will see the output of phpinfo().
PHP 7.2.13 (cli) (built: Dec 7 2018 16:12:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.13, Copyright (c) 1999-2018, by Zend Technologies
nginx version: nginx/1.14.2
This image comes with this preinstalled php extensions:
Composer version 1.8.0 2018-12-03 10:31:16
If you need more packages just extend this container and install all the packages you require.
Your Dockerfile could look like this.
You can find the packages for alpine at pkgs.alpinelinux.org.
The MIT License (MIT)
Content type
Image
Digest
Size
39.8 MB
Last updated
almost 8 years ago
docker pull mesa/alpine-nginx-php7