Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F53863368
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Dockerfile b/Dockerfile
index 51ba7dd..23e4c05 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,91 +1,86 @@
#
# Nasqueron - Base nginx / php-fpm image
#
FROM debian:jessie
MAINTAINER Sébastien Santoro aka Dereckson <dereckson+nasqueron-docker@espace-win.org>
# Environment
ENV PHP_VERSION 5.6.8
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=app --with-fpm-group=app
ENV PHP_INI_DIR /usr/local/etc/php
# Required packages for php-fpm and nginx
ENV PHP_BUILD_DEPS bzip2 \
file \
libbz2-dev \
libcurl4-openssl-dev \
libjpeg-dev \
libmcrypt-dev \
libpng12-dev \
libreadline6-dev \
libssl-dev \
libxml2-dev
RUN apt-get update && apt-get install -y ca-certificates curl libxml2 autoconf \
gcc libc-dev make pkg-config nginx-full $PHP_BUILD_DEPS $PHP_EXTRA_BUILD_DEPS \
--no-install-recommends && rm -r /var/lib/apt/lists/*
# PHP build and installation
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1
RUN mkdir -p $PHP_INI_DIR/conf.d
RUN set -x \
&& curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \
&& curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \
&& gpg --verify php.tar.bz2.asc \
&& mkdir -p /usr/src/php \
&& tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \
&& rm php.tar.bz2* \
&& cd /usr/src/php \
&& ./configure \
--with-config-file-path="$PHP_INI_DIR" \
--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
$PHP_EXTRA_CONFIGURE_ARGS \
--disable-cgi \
--enable-mysqlnd \
--enable-bcmath \
--enable-bz2 \
--enable-calendar \
--with-curl \
--with-gd \
--enable-mbstring \
--with-mcrypt \
--with-mysqli \
--with-pdo-mysql \
--enable-pcntl \
--with-openssl \
--with-readline \
--with-zlib \
&& make -j"$(nproc)" \
&& make install \
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \
&& make clean
RUN groupadd -r app -g 433 && \
mkdir /home/app && \
mkdir -p /var/wwwroot/default && \
useradd -u 431 -r -g app -d /home/app -s /sbin/nologin -c "Docker image user for web application" app && \
chown -R app:app /home/app /var/wwwroot/default && \
chmod 700 /home/app && \
chmod 711 /var/wwwroot/default
-#Configuration
-COPY docker-php-ext-* /usr/local/bin/
-COPY php-fpm.conf /usr/local/etc/
-COPY date.ini /usr/local/etc/php/conf.d/
-COPY nginx-default-vhost.conf /etc/nginx/sites-available/default
-
#Docker properties
VOLUME ["/var/wwwroot/default", "/etc/nginx"]
EXPOSE 80
EXPOSE 443
CMD ["/usr/sbin/runsvdir-start"]
# To move infra
RUN apt-get update && apt-get install -y \
runit nano less tmux wget \
--no-install-recommends && rm -r /var/lib/apt/lists/*
-RUN echo "\n\ndaemon off;" >> /etc/nginx/nginx.conf
-COPY service /etc/service
+
+#Configuration
+COPY files /
diff --git a/nginx-default-vhost.conf b/files/etc/nginx/sites-available/default
similarity index 100%
rename from nginx-default-vhost.conf
rename to files/etc/nginx/sites-available/default
diff --git a/service/nginx/run b/files/etc/service/nginx/run
similarity index 100%
rename from service/nginx/run
rename to files/etc/service/nginx/run
diff --git a/service/php-fpm/run b/files/etc/service/php-fpm/run
similarity index 100%
rename from service/php-fpm/run
rename to files/etc/service/php-fpm/run
diff --git a/docker-php-ext-configure b/files/usr/local/bin/docker-php-ext-configure
similarity index 100%
rename from docker-php-ext-configure
rename to files/usr/local/bin/docker-php-ext-configure
diff --git a/docker-php-ext-install b/files/usr/local/bin/docker-php-ext-install
similarity index 100%
rename from docker-php-ext-install
rename to files/usr/local/bin/docker-php-ext-install
diff --git a/php-fpm.conf b/files/usr/local/etc/php-fpm.conf
similarity index 100%
rename from php-fpm.conf
rename to files/usr/local/etc/php-fpm.conf
diff --git a/date.ini b/files/usr/local/etc/php/conf.d/date.ini
similarity index 100%
rename from date.ini
rename to files/usr/local/etc/php/conf.d/date.ini
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Oct 14, 20:35 (16 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4185752
Default Alt Text
(4 KB)
Attached To
Mode
rDPHPFPM Docker image for Nginx, php-fpm
Attached
Detach File
Event Timeline
Log In to Comment