Wednesday, November 21, 2018

docker image : alpine php fpm apache mysql selenium chrome headless

Docker image : php74

standalone alpine php fpm apache mysql selenium chrome headless
 
---------------------------------------------------------------------------------------------- 
Easy to configure autonomous Plug & Play virtual machine :
----------------------------------------------------------------------------------------------
- Dedicaced for high performance / not that much memory avaible so available ram goes straight into caches

- 1 single static php-fpm thread to get a single CPU core !!

- No shutdown if any apache / php / mysql service stopped

- /home folder is rsynced with the mapped "home2" folder for better php performance

- Mysql data persists in volume : /z/mysql/1 - One single static phpFpm thread ( in order to tune the performance )

- Standalone selenium server + headless Chrome for behat / integration tests

- Empty memory usage ( with php, apache, mysql, selenium started is : 144 Mo )

---------------------------------
#Recipe :
#to build the image

    docker build -t php74 .;
   
#put it up with volumes and linked files

    docker-compose up -d php;
   
#enter the machine

    docker exec -it php bash;
   
#re-start the services ( in cache of apache.conf, php.ini, init.sh modifications ):
    docker exec -it php bash init.sh;
   
#know what's going on
    docker exec -it php top
   
To remove intermediate containers created : docker rm -f $(docker ps -aq);

No comments: