Skip to content

shengyf3/alpine-nginx-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

alpine-nginx-php

Nginx running in Alpine with PHP 7.4.x (fpm), developed for PHP apps. Uncompressed size: ~107 MB.

Usage

Run Container [local exposed port 8080].

# nginx runs as www-data user

docker run -p 8080:80 -d your/image

Entry point options

--nginx-env: export env vars to nginx, var must have at least one underscore, ie. *APP_ENV*, *APP_TZ*.

Build Arguments (see build file)

timezone="Asia/Shanghai"

Build

FROM wdmsyf/alpine-nginx-php:7.4

# install any other package...
# apk add --no-cache php7-mysqli && rm -rf /var/cache/apk/*

# working directory
WORKDIR /var/www

# composer install dependencies
COPY composer.json .
RUN composer install --no-dev && composer dump-autoload --optimize --no-dev

# project code
COPY . .

# start supervisor
CMD ["--nginx-env"]

Packages & PHP Extensions

  • bash
  • supervisord
  • curl
  • gettext
  • composer
  • php
  • php-curl
  • php-dom
  • php-fileinfo
  • php-fpm
  • php-gettext
  • php-json
  • php-mbstring
  • php-pdo
  • php-phar
  • php-psr
  • php-opcache
  • php-openssl
  • php-session
  • php-simplexml
  • php-tokenizer
  • php-xml
  • php-zlib

About

基于alpine安装的基础php运行环境

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published