Skip to content

Improwised/docker-php-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-php-base

Base container image for modern PHP applications built on top of Alpine Linux. Targeted for containerizing Laravel.

Usage

  • Create a Dockerfile in root of your PHP project.
FROM improwised/php-base:latest

# Copy Composer
COPY ./composer.* /var/www/

# Install dependencies
RUN composer install --no-scripts --no-autoloader

# Copy app
COPY . /var/www

# Generate autoload and fix permissions
RUN set -ex \
  && composer dump-autoload --optimize \
  && chown -R nginx:nginx /var/www
  • Build your application Docker image for Production
docker build -t my-laravel-app .
docker run -it --rm --name my-running-app my-laravel-app

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •