Coder Social home page Coder Social logo

daosonit / laravel-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jppcel/laravel-docker

0.0 2.0 0.0 39 KB

Docker image for Laravel based on Apache

Home Page: https://hub.docker.com/r/wesleyelfring/laravel-apache/

License: MIT License

Dockerfile 100.00%

laravel-docker's Introduction

Laravel

Complete Docker image for Laravel based on Apache. Configurable to only have what you need.

Base Image

Based on _/php:7apache and php:7, see https://hub.docker.com/_/php/

Image Types

Image Tag Description
latest Basic image with Apache for Laravel Production sites
build Basic CLI image with building NodeJS (stable via N), Yarn, Gulp, PHPUnit, Composer
complete Takes the production image and adds the build tools on top

Both Complete and the Latest images use the official PHP production config, the build image uses the official development config file.

Extensions

The following extensions are installed out of the box for the production image

  • intl
  • mbstring
  • pcntl
  • pdo_mysql
  • pdo_pgsql
  • pgsql
  • zip
  • opcache
  • gd
  • redis (PECL)
  • xdebug (PECL)

Note that xdebug is not enabled in the production (latest) build. Enable it with RUN docker-php-ext-enable xdebug. Xdebug is enabled for both the complete and build versions.

Using this image

Make the following Dockerfile in your project:

FROM wesleyelfring/laravel-apache:latest
MAINTAINER Wesley Elfring <[email protected]>

# Copy files
WORKDIR /var/www/html/
COPY . .

Overwriting Apache vhost config

You can overwrite the site.conf by adding the following to your Dockerfile:

# Write apache config
COPY sites.conf /etc/apache2/sites-available/site.conf
RUN a2ensite sites.conf

The default contents of site.conf are:

<VirtualHost *:80>
  DocumentRoot /var/www/html/public

  <Directory /var/www/html/public>
    AllowOverride All
  </Directory>
</VirtualHost>

Keep in mind that you might want to log to stdout and stderr to see the logs in Docker. In that case, do not add log statements in your Apache config

laravel-docker's People

Contributors

wesleye avatar

Watchers

James Cloos avatar Đào Đăng Sơn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.