Skip to content

Instantly share code, notes, and snippets.

@welcoMattic
Created January 12, 2018 09:47
Show Gist options
  • Save welcoMattic/b1c3a0a1d71782adb33e5d7c80093d9b to your computer and use it in GitHub Desktop.
Save welcoMattic/b1c3a0a1d71782adb33e5d7c80093d9b to your computer and use it in GitHub Desktop.
Dockerfile php
FROM alpine:3.7
RUN apk --update upgrade && apk add bash && rm -rf /var/cache/apk/*
# Php
RUN apk --update add \
php7 \
php7-apcu \
php7-calendar \
php7-ctype \
php7-curl \
php7-dom \
php7-iconv \
php7-intl \
php7-json \
php7-mbstring \
php7-opcache \
php7-openssl \
php7-pdo \
php7-pdo_mysql \
php7-pcntl \
php7-posix \
php7-session \
php7-simplexml \
php7-sockets \
php7-tokenizer \
php7-xml \
php7-zip \
pcre \
&& \
rm -rf /var/cache/apk/*
# Install fake user youruser
ARG YOURUSER_UID=1000
RUN addgroup -g 1000 youruser && \
adduser -S -u $YOURUSER_UID -h /home/youruser -s /bin/bash youruser youruser
# Configuration
COPY app.ini /etc/php7/conf.d/app.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment