Giter Site home page Giter Site logo

rascoop / docker-laravel Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 7 KB

Docker definition for Laravel Development. This is an attempt to make development using docker simple by having most of the needed stuff inside the php container.

Dockerfile 100.00%
docker php-container composer laravel xdebug

docker-laravel's Introduction

docker-laravel

Docker definition for Laravel Development. This is an attempt to make development using docker simple by having most of the needed stuff inside the php container. This image is now based on alpine linux and has extensions for SQLite, MySQL, MariaDB and Postgresql Xdebug is also installed ##Build The simplest way to use this Docker definition is to build the image: docker build .

You can also build the image and include a tag to make it easier to find like so: docker build -t <dockhubname>/php-fpm-laravel:latest .

##Use The best way to use this image is with other images.

As it does not have a webserver nor a database server, use it as part of a group. Check the docker-compose.yml in this repository. The necessary mysql drivers are installed. But if you are planning in using anything else please feel free to fork and change.

When running composer or php artisan you need to do it from the php container. You can go to the container by: docker exec -ti appnamephp /bin/bash Once inside the container, you can run composer by php /usr/local/bin/composer You can also run this without being in the container's terminal by running composer or artisan like so: docker exec appnamephp php /usr/local/bin/composer or docker exec appnamephp php artisan

One thing that you need to be aware is that whenever you run any of those commands, you need to run sudo chmod -R yourusername:yourusername ./src/*. The reason for this is that when inside the container the commands are run as root and therefore owned by root.

Hope this helps you setup a development environment faster.

###xdebug To enable xdebug please mount a volume that points to /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

docker-laravel's People

Contributors

rascoop avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

inc775

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.