Sign inSign up

arpanpal010/alpine-nginxphp

By arpanpal010

•Updated almost 9 years ago

Automated NGINX/PHP7 image built from alpine-nginx on a Raspberry Pi/Intel NUC.

Image
1

1.5K

arpanpal010/alpine-nginxphp repository overview

⁠Alpine-nginXPHP

⁠Container for Alpine Linux + NGINX + PHP7

This image⁠ serves as the base container for applications/services tht require a PHP⁠ server running using php-fpm. It is proxied out through Nginx, which is also used to serve the statics. The web root dir is at /config/www.

Built from my alpine-nginx⁠ image using latest available php7.

The packages below are installed by default into the image.

  • php7-fpm
  • php7-curl
  • php7-mcrypt
  • php7-mbstring
  • php7-openssl
  • php7-pcntl
  • php7-json

Based on Alpine Linux⁠.

The image is tagged respectively for 2 architectures,

  • armhf
  • x86_64

⁠Get the Image

Pull the image for your architecture it's already available from Docker Hub.

# make pull
docker pull arpanpal010/alpine-nginxphp:x86_64


⁠Run

# make
docker run --rm -it
  --name docker_nginxphp --hostname nginxphp
  -e PGID=100 -e PUID=1000
  -c 256 -m 128m
  -p 80:80 -p 443:443
  -v $(CURDIR)/config:/config
  -v /etc/hosts:/etc/hosts:ro
  -v /etc/localtime:/etc/localtime:ro
  -e TZ=Asia/Kolkata
  arpanpal010/alpine-nginxphp:x86_64

# make stop
docker stop -t 2 docker_nginxphp

# make rm
# stop first
docker rm -f docker_nginxphp

# make restart
docker restart docker_nginxphp


⁠Shell access

# make rshell
docker exec -u root -it docker_nginxphp /bin/bash

# make shell
docker exec -it docker_nginxphp /bin/bash

# make logs
docker logs -f docker_nginxphp


⁠Development


If you have the repository access, you can clone and build the image yourself for your own system, and can push after.


⁠Setup

Before you clone the repo, you must have Git⁠, GNU make⁠, and Docker⁠ setup on the machine.

git clone <repository url>
cd <repository>

You can always skip installing make but you will have to type the whole docker commands then instead of using the sweet make targets.


⁠Build

To locally build the image for your system.

# make build
docker build --rm --force-rm \
  -t arpanpal010/alpine-nginxphp:x86_64 \
  --no-cache=true --pull .

# make push
docker push arpanpal010/alpine-nginxphp:x86_64


⁠Maintenance


Currently built daily on a RaspberryPi3 (armhf builds) or IntelNUC (x64 builds). Docker hub builds maintained by arpanpal010⁠.

Tag summary

Content type

Image

Digest

Size

13.9 MB

Last updated

almost 9 years ago

docker pull arpanpal010/alpine-nginxphp:x86_64