Docker image based on:
- Ubuntu 16.04
- Phalcon 3
- PHP 7.1
- Nginx + PHP FPM
- Supervisord
Docker. For installation instructions check https://docs.docker.com/engine/installation/
- To change the mapped port look in docker-compose.yaml
- Default mapped port is 9000.
- Check /build directory for PHP and Nginx tweaking.
docker-compose build
This will build the base image and run the container daemonized.
docker-compose push
This will build and push container image to docker hub repository.
docker-compose up -d
This will run container in the backgroun and build image if necessary. Check http://localhost:9000
docker exec -it web bash
> # important commands and files inside container
> /etc/init.d/nginx reload
> /etc/init.d/php7.0-fpm restart
> ls -la /var/www/html
> ls /etc/nginx/sites-enabled/default
> ls /etc/php/7.1/fpm/php.ini
If you want map /var/www/html dir to your local dir ./html outside of container then run edit docker-compose.yml and uncomment the following line:
# volumes:
# - ./html:/var/www/html
and restart container with the following commands(it's safe and should not affect your files):
docker-compose down
docker-compose up -d
Create file ./html/index.php with content:
<?php phpinfo(); ?>
Check http://localhost:9000 to see phpinfo output.
docker-compose down
docker logs web