Skip to content

Dockerfile and etc for a WordPress docker image with PHP 7.2

License

Unlicense, Unlicense licenses found

Licenses found

Unlicense
LICENSE.txt
Unlicense
UNLICENSE.txt
Notifications You must be signed in to change notification settings

willihangga/docker-apache-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Unlicense, Unlicense licenses found

Licenses found

Unlicense
LICENSE.txt
Unlicense
UNLICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%