Skip to content

mrsanjaya/dockerphp73

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOCKER APACHE DAN PHP 7.3

PENGGUNAAN

Clone

$ git clone http://github.com/derymukti/dockerphp70apache.git 

Open

$ cd dockerphp70apache

Anda dapat mengubah file di dalam folder www atau mengganti dengan program anda

BUILD DOCKER CONTAINER AN RUN STATIC

Build

$ sudo docker build -t mysite . 

Run

$ sudo docker run -d --name mysite-container -p 8080:80 mysite 

buka http://localhost:8080

Stop

$ sudo docker stop mysite-container

CONFIG & RUN WITH DOCKER-COMPOSE (opsi 1)

Config

file docker-compose.yml

version: '2'
services:
  app:
	  image: mrsanjaya/php73:latest
	  volumes: 
	   - ./www:/var/www/html:rw
	  ports:
	   - "8080:80"

Anda dapat mengganti image dengan 'mysite'.

atau anda dapat merubah file docker-compose.yml menjadi

version: '2'
services:
  app:
	  build: ./
	  volumes: 
	   - ./www:/var/www/html:rw
	  ports:
	   - "8080:80"

Start & Build

$ sudo docker-compose up --build

Start Only

$ sudo docker-compose up -d

Stop

$ sudo docker-compose down

RUN DYNAMIC WITH DOCKER (opsi 2)

Run Dynamic Volume

$ sudo docker run -d --name mysite-container -v /home/$(whoami)/dockerphp70apache/www:/var/www/html -p 8080:80 mysite

Stop

$ sudo docker stop mysite-container

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •