badams / laravel-docker-dev

A docker image for developing Laravel application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Docker Dev

This is a image for you to quickly start running a Laravel application in docker. The image contains xdebug so you don't want to use it for production.

Composer comes with the image.

Supported tags and respective Dockerfile links

Deprecated

PHP Extensions

  • bcmath
  • curl
  • gettext
  • gd
  • exif
  • iconv
  • intl
  • ldap
  • mbstring
  • opcache
  • pdo_mysql
  • pdo_pgsql
  • pdo_dblib
  • soap
  • sockets
  • zip
  • xdebug
  • grpc
  • memcached
  • pcntl

Environment variables

This image supports the environment variables below:

PHP_XDEBUG_REMOTE_ENABLE: on
PHP_XDEBUG_REMOTE_AUTOSTART: on
PHP_XDEBUG_DEFAULT_ENABLE: off
PHP_XDEBUG_REMOTE_HOST: docker.for.mac.localhost
PHP_XDEBUG_REMOTE_PORT: 9000
PHP_XDEBUG_REMOTE_CONNECT_BACK: off
PHP_XDEBUG_IDEKEY: PHPSTORM
ENABLE_CRON_JOB: false
ENABLE_LARAVEL_WORKER: false
ENABLE_LARAVEL_HORIZON: false

Volumes mount

/app - The directory the application should be mounted to

A sample usage with docker-compose

docker-composer.yml

version: '3'
services:
  php:
    image: chcjonathanguo/laravel-docker-dev:latest
    volumes:
      - ./:/app:delegated
    ports:
      - '8000:80'
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated
    environment:
      PHP_IDE_CONFIG: "serverName=myapp.domain"
  nginx:
    image: nginx:latest
    depends_on:
      - php
    volumes:
      - ./:/app:delegated
      - ./docker-config/dev/nginx/default.conf:/etc/nginx/conf.d/default.conf

About

A docker image for developing Laravel application

License:MIT License


Languages

Language:Dockerfile 93.2%Language:Shell 6.8%