зеркало из https://github.com/nextcloud/cookbook.git
Extracted install script into bash script
This commit is contained in:
Родитель
723c2cb3f5
Коммит
832dab970b
|
@ -2,19 +2,8 @@
|
|||
ARG PHPVERSION
|
||||
FROM php:${PHPVERSION}-cli
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends npm make default-mysql-client postgresql-client \
|
||||
unzip git libfreetype6-dev libpng-dev libjpeg-dev libzip-dev cmake libpq-dev libsqlite3-dev && \
|
||||
if [ ${PHPVERSION} = "7.2" ]; then \
|
||||
docker-php-ext-configure gd; \
|
||||
else \
|
||||
docker-php-ext-configure gd --with-freetype --with-jpeg; \
|
||||
fi && \
|
||||
docker-php-ext-install -j $(nproc) gd && \
|
||||
docker-php-ext-configure zip && \
|
||||
docker-php-ext-install -j$(nproc) zip && \
|
||||
docker-php-ext-install -j$(nproc) pdo pdo_mysql pdo_pgsql pdo_sqlite && \
|
||||
apt-get clean
|
||||
COPY install.sh /install.sh
|
||||
RUN /install.sh
|
||||
|
||||
RUN mkdir /workdir
|
||||
WORKDIR /workdir
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
set -x
|
||||
|
||||
function configure_gd_normal ()
|
||||
{
|
||||
docker-php-ext-configure gd --with-freetype --with-jpeg
|
||||
return $?
|
||||
}
|
||||
|
||||
function configure_gd_without ()
|
||||
{
|
||||
docker-php-ext-configure gd
|
||||
return $?
|
||||
}
|
||||
|
||||
function configure_gd()
|
||||
{
|
||||
if [ "$1" = "7.2" ]; then
|
||||
configure_gd_without
|
||||
return $?
|
||||
else
|
||||
configure_gd_normal
|
||||
return $?
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
npm make default-mysql-client postgresql-client \
|
||||
unzip git libfreetype6-dev libpng-dev libjpeg-dev libzip-dev cmake libpq-dev libsqlite3-dev
|
||||
apt-get clean
|
||||
|
||||
configure_gd "$1"
|
||||
docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
docker-php-ext-configure zip
|
||||
docker-php-ext-install -j$(nproc) zip
|
||||
|
||||
docker-php-ext-install -j$(nproc) pdo pdo_mysql pdo_pgsql pdo_sqlite
|
Загрузка…
Ссылка в новой задаче