GithubHelp home page GithubHelp logo

laravel's Introduction

Docker Pulls

laravel

Docker image to run PHP (supporting Laravel) and Node projects.

This image it's for development. Optimize to use in production!

In the latest update, I changed the base image to php:alpine for size optimizing.

Tags

  • latest:
  • php 7.2.8
    • composer 1.7.1
    • phpunit7.3.1
    • xdebug 2.6.1
  • nodejs 8.11.3
    • npm 6.4.0
    • yarn 1.9.4

Supported Databases (PDO)

  • mssql (via dblib)
  • mysql
  • pgsql
  • sqlite

Extra supported extensions

  • curl
  • exif
  • gd
  • ldap
  • mongodb

Installing

docker pull hitalos/laravel

Using

With docker

docker run --name <container_name> -d -v $PWD:/var/www -p 80:80 hitalos/laravel

Where $PWD is the laravel installation folder.

With docker-compose

Create a docker-compose.yml file in the root folder of project using this as a template:

web:
    image: hitalos/laravel:latest
    ports:
        - 80:80
    volumes:
        - ./:/var/www
    # If you don't want to use default 'artisan serve' command, edit and uncomment the line below.
    # command: php -S 0.0.0.0:80 -t public public/index.php

Then run using this command:

docker-compose up

If you want to use a database, you can create your docker-compose.yml with two containers.

web:
    image: hitalos/laravel:latest
    ports:
        - 80:80
    volumes:
        - ./:/var/www
    links:
        - db
    environment:
        DB_HOST: db
        DB_DATABASE: dbname
        DB_USERNAME: username
        DB_PASSWORD: p455w0rd
        DB_CONNECTION: [pgsql or mysql]
db:
    image: [postgres or mysql]
    environment:
        # with mysql
        MYSQL_DATABASE: dbname
        MYSQL_USER: username
        MYSQL_PASSWORD: p455w0rd

        # with postgres
        POSTGRES_DB: dbname
        POSTGRES_USER: username
        POSTGRES_PASSWORD: p455w0rd

laravel's People

Contributors

brunodles avatar hitalos avatar

Watchers

 avatar  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.