Skip to content

Commit

Permalink
fix some broken scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Sep 11, 2020
1 parent 8b18dc5 commit a15e507
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 46 deletions.
2 changes: 1 addition & 1 deletion php/scripts/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

# Installing Chromium for Dusk
DEBIAN_FRONTEND=noninteractive apt-get install -yqq \
DEBIAN_FRONTEND=noninteractive apt-get install -yq \
libgconf-2-4 \
libnss3 \
libxi6 \
Expand Down
6 changes: 3 additions & 3 deletions php/scripts/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

apt-get purge -yqq --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
apt-get purge -yq --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
apt-utils \
build-essential \
dpkg-dev \
Expand All @@ -14,7 +14,7 @@ apt-get purge -yqq --auto-remove -o APT::AutoRemove::RecommendsImportant=false -
re2c \
wget

apt-get autoremove -yqq --purge
apt-get autoclean -yqq
apt-get autoremove -yq --purge
apt-get autoclean -yq
apt-get clean
rm -rf /var/cache/apt/ /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* /usr/share/doc /usr/share/doc-base /usr/share/groff/* /usr/share/info/* /usr/share/linda/* /usr/share/lintian/overrides/* /usr/share/locale/* /usr/share/man/* /usr/share/locale/* /usr/share/gnome/help/*/* /usr/share/doc/kde/HTML/*/* /usr/share/omf/*/*-*.emf
72 changes: 36 additions & 36 deletions php/scripts/extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,35 @@

set -euo pipefail

extensions=" \
bcmath \
bz2 \
calendar \
exif \
gmp \
intl \
mysqli \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
pgsql \
soap \
xmlrpc \
xsl \
zip
"
export extensions=" \
bcmath \
bz2 \
calendar \
exif \
gmp \
intl \
mysqli \
opcache \
pcntl \
pdo_mysql \
pdo_pgsql \
pgsql \
soap \
xmlrpc \
xsl \
zip
"

if [[ $PHP_VERSION == "7.4" || $PHP_VERSION == "7.3" || $PHP_VERSION == "7.2" ]]; then
buildDeps=" \

export buildDeps=" \
default-libmysqlclient-dev \
libbz2-dev \
libsasl2-dev \
pkg-config \
" \
runtimeDeps=" \
"

export runtimeDeps=" \
imagemagick \
libfreetype6-dev \
libgmp-dev \
Expand All @@ -38,7 +40,6 @@ if [[ $PHP_VERSION == "7.4" || $PHP_VERSION == "7.3" || $PHP_VERSION == "7.2" ]]
libldap2-dev \
libmagickwand-dev \
libmemcached-dev \
libmemcached \
libmemcachedutil2 \
libpng-dev \
libpq-dev \
Expand All @@ -51,12 +52,14 @@ if [[ $PHP_VERSION == "7.4" || $PHP_VERSION == "7.3" || $PHP_VERSION == "7.2" ]]
multiarch-support \
"
else
buildDeps=" \

export buildDeps=" \
default-libmysqlclient-dev \
libbz2-dev \
libsasl2-dev \
" \
runtimeDeps=" \
"

export runtimeDeps=" \
imagemagick \
libfreetype6-dev \
libgmp-dev \
Expand All @@ -67,7 +70,6 @@ else
libmagickwand-dev \
libmcrypt-dev \
libmemcached-dev \
libmemcached \
libmemcachedutil2 \
libpng-dev \
libpq-dev \
Expand All @@ -79,24 +81,22 @@ else
"
fi

apt-get update \
&& apt-get install -yq $buildDeps \
&& apt-get install -yq $runtimeDeps \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install -j$(nproc) $extensions

if [[ $PHP_VERSION == "7.4" ]]; then
DEBIAN_FRONTEND=noninteractive apt-get install -yqq $buildDeps \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yqq $runtimeDeps \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install -j$(nproc) $extensions \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap \
&& PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install -j$(nproc) imap \
&& docker-php-source delete
else
DEBIAN_FRONTEND=noninteractive apt-get install -yqq $buildDeps \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yqq $runtimeDeps \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install -j$(nproc) $extensions \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap \
Expand Down
2 changes: 1 addition & 1 deletion php/scripts/node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

# NODE JS
curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& DEBIAN_FRONTEND=noninteractive apt-get install nodejs -yqq \
&& DEBIAN_FRONTEND=noninteractive apt-get install nodejs -yq \
&& npm i -g npm \
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
&& npm cache clean --force
Expand Down
8 changes: 3 additions & 5 deletions php/scripts/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@ set -euo pipefail
# this forces dpkg not to call sync() after package extraction and speeds up
# install
echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
#
# we don't need and apt cache in a container
echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf
export DEBIAN_FRONTEND=noninteractive

DEBIAN_FRONTEND=noninteractive
dpkg-reconfigure -f noninteractive tzdata \
&& apt-get update \
&& apt-get upgrade \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yqq \
&& apt-get install -yq \
apt-transport-https \
apt-utils \
ca-certificates \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yqq \
&& apt-get install -yq \
build-essential \
curl \
git \
Expand Down

0 comments on commit a15e507

Please sign in to comment.