Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Docker
drupal
php-drupal
Commits
8b2385b7
Verified
Commit
8b2385b7
authored
Jun 07, 2018
by
Christoph Böhner-Figas
Browse files
Add drupal dependencies and drush.phar
parent
0c0f01fd
Pipeline
#10832
passed with stage
in 11 minutes and 52 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
7.2/Dockerfile
View file @
8b2385b7
...
...
@@ -8,13 +8,72 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Install xdebug
RUN
apt-get update
&&
\
apt-get
install
-y
autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c
&&
\
apt-get
install
-y
--no-install-recommends
\
autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c
&&
\
pecl
install
xdebug
&&
\
rm
-rf
/var/lib/apt/lists/
*
# TODO: Remove packages again, currently apt will bail out with:
# "WARNING: The following essential packages will be removed.
# This should NOT be done unless you know exactly what you are doing!"
#apt-get remove -y autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c && \
# Add drupal dependencies
# install the PHP extensions we need
RUN
set
-ex
;
\
\
if
command
-v
a2enmod
;
then
\
a2enmod rewrite
;
\
fi
;
\
\
savedAptMark
=
"
$(
apt-mark showmanual
)
"
;
\
\
apt-get update
;
\
apt-get
install
-y
--no-install-recommends
\
libjpeg-dev
\
libpng-dev
\
libpq-dev
\
;
\
\
docker-php-ext-configure gd
--with-png-dir
=
/usr
--with-jpeg-dir
=
/usr
;
\
docker-php-ext-install
-j
"
$(
nproc
)
"
\
gd
\
opcache
\
pdo_mysql
\
pdo_pgsql
\
zip
\
;
\
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN
{
\
echo
'opcache.memory_consumption=128'
;
\
echo
'opcache.interned_strings_buffer=8'
;
\
echo
'opcache.max_accelerated_files=4000'
;
\
echo
'opcache.revalidate_freq=60'
;
\
echo
'opcache.fast_shutdown=1'
;
\
echo
'opcache.enable_cli=1'
;
\
}
>
/usr/local/etc/php/conf.d/opcache-recommended.ini
# INSTALL DRUSH
# Install Drush 8 with the phar file.
RUN
curl
-fsSL
-o
/usr/local/bin/drush
"https://github.com/drush-ops/drush/releases/download/8.1.17/drush.phar"
&&
\
chmod
+x /usr/local/bin/drush
COPY
team23-docker-php-enable-xdebug.sh /usr/local/bin/
# Enable our own entrypoint which can be used to install/enable xdebug using env variables
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment