Skip to content
A sample dockerized laravel app.
PHP HTML Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bootstrap
config
database
mysql
nginx/conf.d
php
public
resources
routes
storage
tests
.editorconfig
.env.example
.env.swp
.gitattributes
.gitignore
.styleci.yml
CHANGELOG.md
Dockerfile
artisan
composer.json
composer.lock
docker-compose.yml
package.json
phpunit.xml
readme.md
server.php
webpack.mix.js

readme.md

Dockerized Laravel App

A sample dockerized laravel app.

Usage

Make sure you have docker and docker compose on your machine.

How To Install and Use Docker on Ubuntu

How To Install Docker Compose on Ubuntu

Clone the project

cd into the project directory

Run docker-compose up -d

This will build three docker container

app, db, webserver

Generate app key

docker-compose exec app php artisan key:generate

Cache configurations

docker-compose exec app php artisan config:cache

Enter the database and login to mysql

docker-compose exec db bash

mysql -u root -p

make use of the password defined inside the docker-compose.yml file.

You can’t perform that action at this time.