Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769868
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 c2823e0..9fe48de 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,117 +1,117 @@
#
# Nasqueron - Base nginx / php-fpm image
#
FROM debian:jessie
MAINTAINER Sébastien Santoro aka Dereckson <dereckson+nasqueron-docker@espace-win.org>
#
# Prepare the container
#
ENV PHP_VERSION 7.4.27
ENV ONIGURAMA_VERSION=6.9.7.1
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=app --with-fpm-group=app
ENV PHP_INI_DIR /usr/local/etc/php
ENV PHP_BUILD_DEPS bzip2 \
file \
libbz2-dev \
libzip-dev \
libcurl4-openssl-dev \
libjpeg-dev \
libpng12-dev \
libxpm-dev \
libwebp-dev \
libfreetype6-dev \
libreadline6-dev \
libssl-dev \
libxslt1-dev \
libxml2-dev
ENV LANG C.UTF-8
RUN apt-get update && apt-get install -y ca-certificates curl libxml2 autoconf \
libedit-dev libsqlite3-dev xz-utils \
gcc libc-dev make pkg-config nginx-full \
runit nano less tmux wget git locales unzip \
$PHP_BUILD_DEPS $PHP_EXTRA_BUILD_DEPS \
--no-install-recommends && rm -r /var/lib/apt/lists/* \
&& dpkg-reconfigure locales
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys \
5A52880781F755608BF815FC910DEB46F53EA312 \
42670A7FE4D0441C8E4632349E4FDC074A4EF02D \
&& mkdir -p $PHP_INI_DIR/conf.d \
&& 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* \
&& wget -O /usr/src/onigurama.tar.gz https://github.com/kkos/oniguruma/releases/download/v$ONIGURAMA_VERSION/onig-$ONIGURAMA_VERSION.tar.gz \
&& mkdir /usr/src/onigurama \
&& cd /usr/src/onigurama \
&& tar xzf ../onigurama.tar.gz --strip-components=1 \
&& ./configure && make && make install \
&& cd /usr/src/php \
&& export CFLAGS="-fstack-protector-strong -fpic -fpie -O2" \
&& export CPPFLAGS="$CFLAGS" \
&& export LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie" \
&& ./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 \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-gd \
--with-jpeg \
--with-freetype \
--with-xpm \
--with-webp \
--enable-exif \
--enable-ftp \
--with-libedit \
--enable-mbstring \
--with-mysqli \
--with-pdo-mysql \
--enable-pcntl \
--with-openssl \
--with-xsl \
--with-readline \
--with-zlib \
--with-zip \
--with-pear \
&& 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 \
&& pecl install APCu \
&& cd /opt \
&& curl -sS https://getcomposer.org/installer | php \
&& ln -s /opt/composer.phar /usr/local/bin/composer
RUN groupadd -r app -g 433 && \
mkdir /home/app && \
mkdir -p /var/wwwroot/default && \
useradd -u 431 -r -g app -d /home/app -s /usr/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
COPY files /
#
# Docker properties
#
VOLUME ["/var/wwwroot/default", "/etc/nginx"]
EXPOSE 80
EXPOSE 443
-CMD ["/usr/local/sbin/runsvdir-init"]
+CMD ["/usr/bin/runsvdir", "-P", "/etc/service"]
diff --git a/files/etc/service/nginx/run b/files/etc/service/nginx/run
index 384d533..21060ee 100755
--- a/files/etc/service/nginx/run
+++ b/files/etc/service/nginx/run
@@ -1,4 +1,3 @@
#!/bin/bash
exec 2>&1
-source /usr/local/etc/envvars
exec /usr/sbin/nginx
diff --git a/files/etc/service/php-fpm/run b/files/etc/service/php-fpm/run
index e440441..2dce83f 100755
--- a/files/etc/service/php-fpm/run
+++ b/files/etc/service/php-fpm/run
@@ -1,5 +1,4 @@
#!/bin/bash
exec 2>&1
-source /usr/local/etc/envvars
php-fpm-env > /usr/local/etc/php-fpm-env.conf
exec /usr/local/sbin/php-fpm --nodaemonize
diff --git a/files/usr/local/sbin/runsvdir-init b/files/usr/local/sbin/runsvdir-init
deleted file mode 100755
index 7c16fd2..0000000
--- a/files/usr/local/sbin/runsvdir-init
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-export > /usr/local/etc/envvars
-exec /usr/sbin/runsvdir-start
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 17:33 (10 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260648
Default Alt Text
(4 KB)
Attached To
Mode
rDPHPVIIFPM Docker image to install nginx, PHP 7 and fpm
Attached
Detach File
Event Timeline
Log In to Comment