/laravel-docker-prod

A docker image for running laravel app in production

Primary LanguageDockerfileMIT LicenseMIT

Laravel Docker Dev

This is a image for you to quickly start running a Laravel application in docker.

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
  • grpc
  • memcached

Environment variables

This image supports the environment variables below:

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-prod:latest
    volumes:
      - ./:/app:delegated
    ports:
      - '8000:80'
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated
  nginx:
    image: nginx:latest
    depends_on:
      - php
    volumes:
      - ./:/app:delegated
      - ./docker-config/dev/nginx/default.conf:/etc/nginx/conf.d/default.conf