Skip to content

JohnnyWorks-TW/docker-php72-fpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Docker php72-fpm-alpine image

Docker php72-fpm-alpine image, based on alpine image.

  • Alpine
  • PHP 7.2.34
  • GD 2.1.0 Support
  • Memchache 4.0.5.2 support
  • Memchached 3.2.0 support
  • Redis 6.0.2 support
  • mbstring support
  • mysqli support
  • pdo_mysql support
  • pdo_pgsql support

How to use?

DockerHub repository: https://hub.docker.com/r/johnnyworks/php72-fpm-alpine

You can set your website up by using docker-compose

Here is sample of docker-compose.yml

version: '3.7'
services:
  nginx:
    image: nginx:mainline-alpine-slim
    restart: always
    ulimits:
      nofile:
        soft: 10240
        hard: 10240
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - ./www:/data
      - ./conf:/etc/nginx/conf.d
    links:
      - phpfpm
    logging:
      driver: 'json-file'
      options:
        max-file: '2'
        max-size: '2m'
    networks:
      - default
  phpfpm:
    image: johnnyworks/php72-fpm-alpine:latest
    restart: always
    ulimits:
      nofile:
        soft: 10240
        hard: 10240
    volumes:
      - ./www:/data
      - ./php.ini:/usr/local/etc/php/php.ini
      - ./phpfpm.conf:/usr/local/etc/php-fpm.d/www.conf
    logging:
      driver: 'json-file'
      options:
        max-file: '2'
        max-size: '2m'
    networks:
      - default
networks:
  default:

Put correspond files to following path

  • conf/nginx.conf
  • php.ini
  • phpfpm.conf

and www folder for web root.

then using commands to start your web server.

# docker-compose up -d