Skip to content
 
 

Latest commit

 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Apache PHP 7.2

To Build manual way

git clone https://github.com/willihangga/docker-apache-php.git
cd docker-apache-php
docker build -t="cyberneo/docker-apache-php" .
CONTAINER=$(docker run -d -p [your custom tcp port]:80 -p [your custom mysql port]:3306 -v /your/path/to/serve:/var/www/html --name yourcontainername cyberneo/docker-apache-php)
cd .. && rm -rf docker-apache-php
docker ps

Example build

  • tcp port: 8080
  • mysql port: 33060
  • web files location: ~/Documents/localdomain.com
  • container name: localdomain.com
git clone https://github.com/willihangga/docker-apache-php.git
cd docker-apache-php
docker build -t="cyberneo/docker-apache-php" .
CONTAINER=$(docker run -d -p 8080:80 -p 33060:3306 -v ~/Documents/localdomain.com:/var/www/html --name localdomain.com cyberneo/docker-apache-php)
cd .. && rm -rf docker-apache-php
docker ps

To start/stop your container

# start docker apache php
docker start yourcontainername

# stop docker apache php
docker stop yourcontainername

To access your container

docker exec -it yourcontainername /bin/bash

To access the database

# exec to your container with above command, then run mysql like usual

About

Dockerfile and etc for a WordPress docker image with PHP 7.2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages