Adjust prod Docker

This commit is contained in:
cytopia
2018-02-27 23:38:09 +01:00
parent f5491d91fc
commit 6d35b06c45
33 changed files with 914 additions and 470 deletions

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:5.4-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -15,7 +15,7 @@ LABEL \
###
### Envs (Already set in parent container)
### Envs
###
ENV BASH_PROFILE=".bashrc"
@@ -23,9 +23,20 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
# System dev tools
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
dirmngr \
gnupg \
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ack-grep \
@@ -49,14 +60,15 @@ RUN set -x \
less \
libc-dev \
make \
# mongo-tools \
mongodb-clients \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
nano \
net-tools \
netcat \
# postgresql-client \
nodejs \
postgresql-client \
python-pip \
rubygems \
ruby-dev \
@@ -73,33 +85,64 @@ RUN set -x \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*
## Node / NPM
#RUN set -x \
# && mkdir -p /usr/local/src \
# && VERSION="$( curl -Lq https://nodejs.org 2>/dev/null | grep LTS | grep -Eo 'data-version.*.' | grep -oE 'v[0-9.]+' )" \
# && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=30 \
# -P /usr/local/src https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-x64.tar.xz \
# && unxz /usr/local/src/node-${VERSION}-linux-x64.tar.xz \
# && tar xvf /usr/local/src/node-${VERSION}-linux-x64.tar -C /usr/local/src \
# && ln -s /usr/local/src/node-${VERSION}-linux-x64 /usr/local/node \
# && ln -s /usr/local/node/bin/* /usr/local/bin/ \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64.tar* \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/LICENSE \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/*.md \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/include \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/share \
# && npm --version | grep -E '[.0-9]+' \
# && node --version | grep -E '[.0-9]+' \
# && rm -rf /root/.config
#
## Composer
#RUN set -x \
# && curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/local/bin/composer \
# && composer self-update
## && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
## && rm -rf /root/.composer
#
# composer
RUN set -x true \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& true
# drush
RUN set -x true \
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
&& rm -rf /home/${MY_USER}/.composer \
\
&& true
# wpcli
RUN set -x true \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
&& true
# symfony
RUN set -x true \
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
&& true
# laravel
RUN set -x true \
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& true
# phalcon
RUN set -x true \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.9 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
&& true
## Drush
#RUN set -x \
# && DRUSH_VERSION="$( curl -q https://api.github.com/repos/drush-ops/drush/releases 2>/dev/null | grep tag_name | grep -Eo '\"[0-9.]+\"' | head -1 | sed 's/\"//g' )" \
@@ -278,6 +321,15 @@ RUN set -x \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' && rm -rf /root/.composer \
&& drush --version | grep -E '[.0-9]+' && rm -rf /root/.drush \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& true
###
### Copy files

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:5.5-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -15,7 +15,7 @@ LABEL \
###
### Envs (Already set in parent container)
### Envs
###
ENV BASH_PROFILE=".bashrc"
@@ -23,9 +23,20 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
# System dev tools
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
dirmngr \
gnupg \
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ack-grep \
@@ -49,14 +60,15 @@ RUN set -x \
less \
libc-dev \
make \
# mongo-tools \
mongodb-clients \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
nano \
net-tools \
netcat \
# postgresql-client \
nodejs \
postgresql-client \
python-pip \
rubygems \
ruby-dev \
@@ -73,33 +85,69 @@ RUN set -x \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*
## Node / NPM
#RUN set -x \
# && mkdir -p /usr/local/src \
# && VERSION="$( curl -Lq https://nodejs.org 2>/dev/null | grep LTS | grep -Eo 'data-version.*.' | grep -oE 'v[0-9.]+' )" \
# && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=30 \
# -P /usr/local/src https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-x64.tar.xz \
# && unxz /usr/local/src/node-${VERSION}-linux-x64.tar.xz \
# && tar xvf /usr/local/src/node-${VERSION}-linux-x64.tar -C /usr/local/src \
# && ln -s /usr/local/src/node-${VERSION}-linux-x64 /usr/local/node \
# && ln -s /usr/local/node/bin/* /usr/local/bin/ \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64.tar* \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/LICENSE \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/*.md \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/include \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/share \
# && npm --version | grep -E '[.0-9]+' \
# && node --version | grep -E '[.0-9]+' \
# && rm -rf /root/.config
#
## Composer
#RUN set -x \
# && curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/local/bin/composer \
# && composer self-update
## && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
## && rm -rf /root/.composer
#
# composer
RUN set -x true \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& true
# drush
RUN set -x true \
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
&& rm -rf /home/${MY_USER}/.composer \
\
&& true
# drupalconsole
RUN set -x true \
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
&& true
# wpcli
RUN set -x true \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
&& true
# symfony
RUN set -x true \
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
&& true
# laravel
RUN set -x true \
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& true
# phalcon
RUN set -x true \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
&& true
## Drush
#RUN set -x \
# && DRUSH_VERSION="$( curl -q https://api.github.com/repos/drush-ops/drush/releases 2>/dev/null | grep tag_name | grep -Eo '\"[0-9.]+\"' | head -1 | sed 's/\"//g' )" \
@@ -278,6 +326,16 @@ RUN set -x \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' && rm -rf /root/.composer \
&& drush --version | grep -E '[.0-9]+' && rm -rf /root/.drush \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& true
###
### Copy files

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:5.6-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -15,7 +15,7 @@ LABEL \
###
### Envs (Already set in parent container)
### Envs
###
ENV BASH_PROFILE=".bashrc"
@@ -23,9 +23,20 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
# System dev tools
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
dirmngr \
gnupg \
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ack-grep \
@@ -49,14 +60,15 @@ RUN set -x \
less \
libc-dev \
make \
# mongo-tools \
mongodb-clients \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
nano \
net-tools \
netcat \
# postgresql-client \
nodejs \
postgresql-client \
python-pip \
rubygems \
ruby-dev \
@@ -73,33 +85,69 @@ RUN set -x \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*
## Node / NPM
#RUN set -x \
# && mkdir -p /usr/local/src \
# && VERSION="$( curl -Lq https://nodejs.org 2>/dev/null | grep LTS | grep -Eo 'data-version.*.' | grep -oE 'v[0-9.]+' )" \
# && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=30 \
# -P /usr/local/src https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-x64.tar.xz \
# && unxz /usr/local/src/node-${VERSION}-linux-x64.tar.xz \
# && tar xvf /usr/local/src/node-${VERSION}-linux-x64.tar -C /usr/local/src \
# && ln -s /usr/local/src/node-${VERSION}-linux-x64 /usr/local/node \
# && ln -s /usr/local/node/bin/* /usr/local/bin/ \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64.tar* \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/LICENSE \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/*.md \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/include \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/share \
# && npm --version | grep -E '[.0-9]+' \
# && node --version | grep -E '[.0-9]+' \
# && rm -rf /root/.config
#
## Composer
#RUN set -x \
# && curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/local/bin/composer \
# && composer self-update
## && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
## && rm -rf /root/.composer
#
# composer
RUN set -x true \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& true
# drush
RUN set -x true \
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
&& rm -rf /home/${MY_USER}/.composer \
\
&& true
# drupalconsole
RUN set -x true \
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
&& true
# wpcli
RUN set -x true \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
&& true
# symfony
RUN set -x true \
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
&& true
# laravel
RUN set -x true \
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& true
# phalcon
RUN set -x true \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
&& true
## Drush
#RUN set -x \
# && DRUSH_VERSION="$( curl -q https://api.github.com/repos/drush-ops/drush/releases 2>/dev/null | grep tag_name | grep -Eo '\"[0-9.]+\"' | head -1 | sed 's/\"//g' )" \
@@ -278,6 +326,16 @@ RUN set -x \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' && rm -rf /root/.composer \
&& drush --version | grep -E '[.0-9]+' && rm -rf /root/.drush \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& true
###
### Copy files

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:7.0-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -15,7 +15,7 @@ LABEL \
###
### Envs (Already set in parent container)
### Envs
###
ENV BASH_PROFILE=".bashrc"
@@ -23,9 +23,20 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
# System dev tools
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
dirmngr \
gnupg \
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ack-grep \
@@ -49,14 +60,15 @@ RUN set -x \
less \
libc-dev \
make \
# mongo-tools \
mongodb-clients \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
nano \
net-tools \
netcat \
# postgresql-client \
nodejs \
postgresql-client \
python-pip \
rubygems \
ruby-dev \
@@ -73,33 +85,69 @@ RUN set -x \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*
## Node / NPM
#RUN set -x \
# && mkdir -p /usr/local/src \
# && VERSION="$( curl -Lq https://nodejs.org 2>/dev/null | grep LTS | grep -Eo 'data-version.*.' | grep -oE 'v[0-9.]+' )" \
# && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=30 \
# -P /usr/local/src https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-x64.tar.xz \
# && unxz /usr/local/src/node-${VERSION}-linux-x64.tar.xz \
# && tar xvf /usr/local/src/node-${VERSION}-linux-x64.tar -C /usr/local/src \
# && ln -s /usr/local/src/node-${VERSION}-linux-x64 /usr/local/node \
# && ln -s /usr/local/node/bin/* /usr/local/bin/ \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64.tar* \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/LICENSE \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/*.md \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/include \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/share \
# && npm --version | grep -E '[.0-9]+' \
# && node --version | grep -E '[.0-9]+' \
# && rm -rf /root/.config
#
## Composer
#RUN set -x \
# && curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/local/bin/composer \
# && composer self-update
## && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
## && rm -rf /root/.composer
#
# composer
RUN set -x true \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& true
# drush
RUN set -x true \
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
&& rm -rf /home/${MY_USER}/.composer \
\
&& true
# drupalconsole
RUN set -x true \
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
&& true
# wpcli
RUN set -x true \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
&& true
# symfony
RUN set -x true \
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
&& true
# laravel
RUN set -x true \
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& true
# phalcon
RUN set -x true \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
&& true
## Drush
#RUN set -x \
# && DRUSH_VERSION="$( curl -q https://api.github.com/repos/drush-ops/drush/releases 2>/dev/null | grep tag_name | grep -Eo '\"[0-9.]+\"' | head -1 | sed 's/\"//g' )" \
@@ -278,6 +326,16 @@ RUN set -x \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' && rm -rf /root/.composer \
&& drush --version | grep -E '[.0-9]+' && rm -rf /root/.drush \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& true
###
### Copy files

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:7.1-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -15,7 +15,7 @@ LABEL \
###
### Envs (Already set in parent container)
### Envs
###
ENV BASH_PROFILE=".bashrc"
@@ -23,9 +23,20 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
# System dev tools
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
dirmngr \
gnupg \
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ack-grep \
@@ -49,14 +60,15 @@ RUN set -x \
less \
libc-dev \
make \
# mongo-tools \
mongodb-clients \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
nano \
net-tools \
netcat \
# postgresql-client \
nodejs \
postgresql-client \
python-pip \
rubygems \
ruby-dev \
@@ -73,33 +85,69 @@ RUN set -x \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*
## Node / NPM
#RUN set -x \
# && mkdir -p /usr/local/src \
# && VERSION="$( curl -Lq https://nodejs.org 2>/dev/null | grep LTS | grep -Eo 'data-version.*.' | grep -oE 'v[0-9.]+' )" \
# && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=30 \
# -P /usr/local/src https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-x64.tar.xz \
# && unxz /usr/local/src/node-${VERSION}-linux-x64.tar.xz \
# && tar xvf /usr/local/src/node-${VERSION}-linux-x64.tar -C /usr/local/src \
# && ln -s /usr/local/src/node-${VERSION}-linux-x64 /usr/local/node \
# && ln -s /usr/local/node/bin/* /usr/local/bin/ \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64.tar* \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/LICENSE \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/*.md \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/include \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/share \
# && npm --version | grep -E '[.0-9]+' \
# && node --version | grep -E '[.0-9]+' \
# && rm -rf /root/.config
#
## Composer
#RUN set -x \
# && curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/local/bin/composer \
# && composer self-update
## && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
## && rm -rf /root/.composer
#
# composer
RUN set -x true \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& true
# drush
RUN set -x true \
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
&& rm -rf /home/${MY_USER}/.composer \
\
&& true
# drupalconsole
RUN set -x true \
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
&& true
# wpcli
RUN set -x true \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
&& true
# symfony
RUN set -x true \
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
&& true
# laravel
RUN set -x true \
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& true
# phalcon
RUN set -x true \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
&& true
## Drush
#RUN set -x \
# && DRUSH_VERSION="$( curl -q https://api.github.com/repos/drush-ops/drush/releases 2>/dev/null | grep tag_name | grep -Eo '\"[0-9.]+\"' | head -1 | sed 's/\"//g' )" \
@@ -278,6 +326,16 @@ RUN set -x \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' && rm -rf /root/.composer \
&& drush --version | grep -E '[.0-9]+' && rm -rf /root/.drush \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& true
###
### Copy files

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:7.2-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -15,7 +15,7 @@ LABEL \
###
### Envs (Already set in parent container)
### Envs
###
ENV BASH_PROFILE=".bashrc"
@@ -23,9 +23,20 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
# System dev tools
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
dirmngr \
gnupg \
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
&& echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/node.list \
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
ack-grep \
@@ -49,14 +60,15 @@ RUN set -x \
less \
libc-dev \
make \
# mongo-tools \
mongodb-clients \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
nano \
net-tools \
netcat \
# postgresql-client \
nodejs \
postgresql-client \
python-pip \
rubygems \
ruby-dev \
@@ -73,33 +85,69 @@ RUN set -x \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -rf /var/lib/apt/lists/*
## Node / NPM
#RUN set -x \
# && mkdir -p /usr/local/src \
# && VERSION="$( curl -Lq https://nodejs.org 2>/dev/null | grep LTS | grep -Eo 'data-version.*.' | grep -oE 'v[0-9.]+' )" \
# && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=30 \
# -P /usr/local/src https://nodejs.org/dist/${VERSION}/node-${VERSION}-linux-x64.tar.xz \
# && unxz /usr/local/src/node-${VERSION}-linux-x64.tar.xz \
# && tar xvf /usr/local/src/node-${VERSION}-linux-x64.tar -C /usr/local/src \
# && ln -s /usr/local/src/node-${VERSION}-linux-x64 /usr/local/node \
# && ln -s /usr/local/node/bin/* /usr/local/bin/ \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64.tar* \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/LICENSE \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/*.md \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/include \
# && rm -rf /usr/local/src/node-${VERSION}-linux-x64/share \
# && npm --version | grep -E '[.0-9]+' \
# && node --version | grep -E '[.0-9]+' \
# && rm -rf /root/.config
#
## Composer
#RUN set -x \
# && curl -sS https://getcomposer.org/installer | php \
# && mv composer.phar /usr/local/bin/composer \
# && composer self-update
## && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
## && rm -rf /root/.composer
#
# composer
RUN set -x true \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& true
# drush
RUN set -x true \
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
&& rm -rf /home/${MY_USER}/.composer \
\
&& true
# drupalconsole
RUN set -x true \
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
&& true
# wpcli
RUN set -x true \
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
&& true
# symfony
RUN set -x true \
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
&& true
# laravel
RUN set -x true \
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& true
# phalcon
RUN set -x true \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
&& true
## Drush
#RUN set -x \
# && DRUSH_VERSION="$( curl -q https://api.github.com/repos/drush-ops/drush/releases 2>/dev/null | grep tag_name | grep -Eo '\"[0-9.]+\"' | head -1 | sed 's/\"//g' )" \
@@ -278,6 +326,16 @@ RUN set -x \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' && rm -rf /root/.composer \
&& drush --version | grep -E '[.0-9]+' && rm -rf /root/.drush \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& true
###
### Copy files

View File

@@ -1,73 +1,78 @@
#!/bin/sh
#
# Available global variables:
# + MY_USER
# + MY_GROUP
#!/usr/bin/env bash
set -e
set -u
set -p pipefail
###
### Variables
### Globals
###
PHP_INI_PATH="/usr/local/etc/php.ini"
FPM_ERROR_LOG_CFG="/usr/local/etc/php-fpm.conf"
FPM_ACCESS_LOG_CFG="/usr/local/etc/php-fpm.d/zzz-docker.conf"
# The following global variables are available by our Dockerfile itself:
# MY_USER
# MY_GROUP
# MY_UID
# MY_GID
# Path to scripts to source
CONFIG_DIR="/docker-entrypoint.d"
# php.ini.d directory
PHP_INI_DIR="/usr/local/etc/php/conf.d"
# This file holds error and access log definitions
FPM_CONF_LOGFILE="/usr/local/etc/php-fpm.d/logfiles.conf"
# PHP-FPM log dir
FPM_LOG_DIR="/var/log/php"
#PHP_CUST_MODULE_DIR="/etc/php-modules.d"
# Custom ini dir (to be copied to actual ini dir)
PHP_CUST_INI_DIR="/etc/php-custom.d"
PHP_REAL_INI_DIR="/usr/local/etc/php.d"
# Supervisord config directory
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
###
### Source libs
###
init="$( find /docker-entrypoint.d -name '*.sh' -type f | sort -u )"
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
for f in ${init}; do
# shellcheck disable=SC1090
. "${f}"
done
###
### Set Debug level
###
DEBUG_LEVEL="$( get_debug_level "DEBUG_ENTRYPOINT" "0" )"
log "info" "Debug level: ${DEBUG_LEVEL}" "${DEBUG_LEVEL}"
#############################################################
## Sanity checks
#############################################################
if ! command -v socat >/dev/null 2>&1; then
log "err" "socat not found, but required." "${DEBUG_LEVEL}"
exit 1
fi
#############################################################
## Entry Point
#############################################################
###
### Set Debug level
###
DEBUG_LEVEL="$( env_get "DEBUG_ENTRYPOINT" "0" )"
log "info" "Debug level: ${DEBUG_LEVEL}" "${DEBUG_LEVEL}"
###
### Change uid/gid
###
set_uid "NEW_UID"
set_gid "NEW_GID"
set_uid "NEW_UID" "${MY_USER}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
###
### Set timezone
###
set_timezone "TIMEZONE" "${PHP_INI_PATH}"
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
###
### Setup postfix
###
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
###
@@ -76,20 +81,16 @@ set_timezone "TIMEZONE" "${PHP_INI_PATH}"
set_docker_logs \
"DOCKER_LOGS" \
"${FPM_LOG_DIR}" \
"${FPM_ERROR_LOG_CFG}" \
"${FPM_ACCESS_LOG_CFG}"
###
### Setup postfix
###
set_postfix "ENABLE_MAIL"
"${FPM_CONF_LOGFILE}" \
"${MY_USER}" \
"${MY_GROUP}" \
"${DEBUG_LEVEL}"
###
### Validate socat port forwards
###
if ! port_forward_validate "FORWARD_PORTS_TO_LOCALHOST"; then
if ! port_forward_validate "FORWARD_PORTS_TO_LOCALHOST" "${DEBUG_LEVEL}"; then
exit 1
fi
@@ -101,7 +102,11 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
lport="$( port_forward_get_lport "${line}" )"
rhost="$( port_forward_get_rhost "${line}" )"
rport="$( port_forward_get_rport "${line}" )"
supervisor_add_service "socat-${lport}-${rhost}-${rport}" "/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" "${SUPERVISOR_CONFD}"
supervisor_add_service \
"socat-${lport}-${rhost}-${rport}" \
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
"${SUPERVISOR_CONFD}" \
"${DEBUG_LEVEL}"
done
@@ -109,21 +114,21 @@ done
### Supervisor: rsyslogd & postfix
###
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${SUPERVISOR_CONFD}" "1"
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${SUPERVISOR_CONFD}"
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
fi
###
### Supervisor: php-fpm
###
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}"
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
###
### Copy custom *.ini files
###
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_REAL_INI_DIR}"
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
###
@@ -134,6 +139,7 @@ set_mds_settings "MYSQL_BACKUP_USER" "MYSQL_BACKUP_PASS" "MYSQL_BACKUP_HOST"
###
### Start
### Startup
###
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf