Skip to content

🐳 Build the docker containers for Laravel local environment

Notifications You must be signed in to change notification settings

ega4432/lara-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lara-docker

Docker Image CI

Overview

This is a repository for building Laravel environment with docker (docker-compose). The base container image of the software used and its version are as follows.

Software base container image
php 7.3-fpm-alpine
mysql 8.0
nginx 1.17-alpine
redis 5.0-alpine
node 13.10-alpine

Setup

Requirements

❯ docker -v
Docker version 19.03.5, build 633a0ea

❯ docker-compose -v
docker-compose version 1.24.1, build 4667896b

Build and Up

❯ docker-compose build
❯ docker-compose up -d

or

❯ docker-compose up -d --build

Excute command

❯ docker-compose exec app [ service name ] ash [ command ( ex: php -v ) ]

Stop and Remove containers

❯ docker-compose down

Install Laravel

❯ docker-compose exec app ash
/work # composer create-project --prefer-dist "laravel/laravel=6.0.*" .

/work # php artisan -V
Laravel Framework 6.6.1

Supplements

Connect to MySQL

$ docker-compose exec db bash -c 'mysql -uroot -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}'

Releases

No releases published

Packages

No packages published