Sign inSign up

npulidom/alpine-nginx-php

By npulidom

Updated over 3 years ago

Nginx running in Alpine with PHP 7.4.x (fpm), developed for PHP apps.

Image
1

10K+

npulidom/alpine-nginx-php repository overview

alpine-nginx-php

Nginx running in Alpine with PHP 7.4.x (fpm), developed for PHP apps.

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="America/Santiago"
Build
FROM your/image

# 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

Tag summary

Content type

Image

Digest

sha256:d6ee083e5

Size

34.6 MB

Last updated

over 3 years ago

docker pull npulidom/alpine-nginx-php