appkr / docker-example

Docker로 라라벨 개발 환경을 구성해봅니다

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Architecture - Dto Example


Docker - 라라벨 개발 환경 구성하기 (LAMP & Xdebug)

이미지 빌드

유튜브에 영상 업로드 후 lamp 브랜치는 master 브랜치에 머지되었습니다.

~/docker-example(master) $ docker build -f docker/Dockerfile --tag lamp:190610 docker

컨테이너 실행

~/docker-example(master) $ docker run -d \
   --name mylamp \
   -v `pwd`:/var/www/html \
   -v `pwd`/docker/data:/var/lib/mysql \
   -p 80:80 \
   -p 3306:3306 \
   -p 9001:9001 \
   lamp:190610

컨테이너 시작과 중지

$ docker stop mylamp
$ docker start mylamp

컨테이너 안으로 들어가기

$ docker exec -it mylamp bash

컨테이너에 실행 중인 프로세스 관리하기

상태 확인

(container) $ supervisorctl status
#mysql      RUNNING   pid 47, uptime 0:27:55
#apache2    RUNNING   pid 45, uptime 0:27:55

stop, start, restart

(container) $ supervisorctl stop apache2
(container) $ supervisorctl stop all

(container) $ supervisorctl start apache2
(container) $ supervisorctl start all

(container) $ supervisorctl restart apache2
(container) $ supervisorctl restart all

About

Docker로 라라벨 개발 환경을 구성해봅니다


Languages

Language:PHP 97.2%Language:HTML 2.2%Language:Vue 0.4%Language:Dockerfile 0.2%