Skip to content

fabioassuncao/docker-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

199 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker PHP-FPM base on Alpine Linux

Build/Publish CI

Simple docker image for PHP/Laravel development.

Why should use this image

  • Built on the lightweight and secure Alpine Linux distribution
  • Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
  • Very small Docker image size

How to use

Build image

VERSION=8.4 make build

Release image

VERSION=8.4 make release

How to customize image name

VERSION=8.4 IMAGE=ghcr.io/fabioassuncao/php make build

Check image by PHP version

VERSION=8.4 make check

Check all image

make check-all

Mount your code to be served with container

docker run --name=app -v /path/to/project:/var/www/html -p 8000:8000 ghcr.io/fabioassuncao/php:8.4

Using docker-compose

x-function: &common_setup
    image: ghcr.io/fabioassuncao/php:8.4
    restart: always
    environment:
        CONTAINER_ROLE: app
        CONTAINER_MODE: automatic
    networks:
      - laravel
    env_file:
        - .env
    volumes:
        - .:/var/www/html

services:
  app:
    <<: *common_setup
    ports:
      - '8000:8000'

  horizon:
    <<: *common_setup
    environment:
      CONTAINER_ROLE: horizon

  scheduler:
    <<: *common_setup
    environment:
      CONTAINER_ROLE: scheduler

networks:
  laravel:
    driver: bridge

PHP version support

  • PHP 8.4 (Lightweight container with PHP 8.4 based on Alpine Linux)
  • PHP 8.3 (Lightweight container with PHP 8.3 based on Alpine Linux)
  • PHP 8.2 (Lightweight container with PHP 8.2 based on Alpine Linux)
  • PHP 8.2-nginx (Lightweight container with PHP 8.2 and nginx based on Debian bullseye)

License

The MIT License (MIT). Please see License File for more information.

About

Docker images for development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors