Sign inSign up

kafnevod/altlinux.p8-apache2-php7-ext

By kafnevod

Updated about 9 years ago

altlinux.p8-apache2-php7 + php7-curl php7-mbstring php7-sockets

Image
0

1.1K

kafnevod/altlinux.p8-apache2-php7-ext repository overview

What's inside

Docker Image include:

  • altlinux p8
  • Apache 2 WEB-server with PHP7 support and mysqli, curl, mbstring, sockets extentions
  • PHP7 interpreter

Getting Started

Start containers
Start container in singlesite mode
$ docker run -d \
    --name «containername» \
    -p «port»:80 \
    -v «path_to_root_web_directory»:/var/www/html/ \
    kafnevod/altlinux.p8-apache2-php7-ext

For example:

$ docker run -d \
    --name taisim \
    -p 81:80 \
    -v /var/www/vhosts/taiaim/:/var/www/html/ \
    kafnevod/altlinux.p8-apache2-php7-ext
Start container in multisite mode
$ docker run -d \
    --name «containername» \
    -p «port»:80 \
    -v «path_to_root_webs_directory»:/var/www/vhosts/ \
    -v «path_to_vhosts_description_file»:/etc/httpd2/conf/sites-available/vhosts.conf \
    kafnevod/altlinux.p8-apache2-php7-ext

vhosts_description_file must contain next structure:

NameVirtualHost *:80
<VirtualHost *:80>
       ServerAdmin <email>
       DocumentRoot "/var/www/vhosts/<web_subdirectory>"
       ServerName «servername»
       ServerAlias «serveralias»
       ErrorLog "/var/log/httpd2/«servername»-error_log"
       CustomLog "/var/log/httpd2/«servername»_log common"
</VirtualHost>

<VirtualHost *:80>
...
</VirtualHost>
...

For example:

$ docker run -d \
    --name webhosting \
    -p 80:80 \
    -v /home/tais/webhosting/vhosts/:/var/www/vhosts/ \
    -v /home/tais/webhosting/vhosts.conf:/etc/httpd2/conf/sites-available/vhosts.conf \
    kafnevod/altlinux.p8-apache2-php7-ext

vhosts_description_file:

NameVirtualHost *:80
<VirtualHost *:80>
       ServerAdmin [email protected]
       DocumentRoot "/var/www/vhosts/taisim"
       ServerName taisim.localhost
       ErrorLog "/var/log/httpd2/taisim-error_log"
       CustomLog "/var/log/httpd2/taisim_log common"
</VirtualHost>
...
Create your own docker-images
Inserting PHP site code into image
  1. Archiving PHP code of project
$ tar  -C  «root_catalog_of_PHP_code»-cvzf «projectname».tgz .
  1. Create Dockerfile:
FROM     kafnevod/altlinux.p8-apache2-php7-ext 
ADD «projectname».tgz /var/www/html
...
  1. Build image:
$ docker build -t «imagename» .

Tag summary

Content type

Image

Digest

Size

96.3 MB

Last updated

about 9 years ago

docker pull kafnevod/altlinux.p8-apache2-php7-ext