Sign inSign up

oz8et/apache-php

By oz8et

Updated over 5 years ago

Image
0

767

oz8et/apache-php repository overview

Apache - PHP 7

Create and run container

sudo mkdir -p /media/web
sudo chown -R pi:root /media/web
ALLIP=`sudo hostname -I`
IP=`echo $ALLIP|cut -d' ' -f1`
docker run -it -d -\
  p $IP:80:80 \
  --restart unless-stopped \
  -v /media/web:/var/www/html/ \
  --name apache-php oz8et/apache-php

Build your own container

create directory for development
mkdir ~/apache_php
cd ~/apache_php
create Dockerfile:
nano Dockerfile

Insert the following content:

FROM debian
RUN apt-get update -y
RUN apt-get install apache2 php php-mysql -y

ENV directoriohtml /var/www/html/

RUN echo "<?php phpinfo(); ?>"  > "$directoriohtml"info.php

VOLUME MiVolumen
EXPOSE 80

CMD apachectl  -DFOREGROUND

save and exit.

build image
docker build -t oz8et/apache-php .

create and run container as above.

Tag summary

Content type

Image

Digest

Size

94.8 MB

Last updated

over 5 years ago

docker pull oz8et/apache-php