mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 15:59:23 +01:00
docker files for 7.4 builds
This commit is contained in:
parent
05cd66fa09
commit
aa32aaccd8
@ -7,7 +7,7 @@ FROM ubuntu:20.04
|
|||||||
MAINTAINER rb@egroupware.org
|
MAINTAINER rb@egroupware.org
|
||||||
|
|
||||||
ARG VERSION=dev-master
|
ARG VERSION=dev-master
|
||||||
ARG PHP_VERSION=7.3
|
ARG PHP_VERSION=7.4
|
||||||
|
|
||||||
# keeping build-arg in environment for entrypoint.sh
|
# keeping build-arg in environment for entrypoint.sh
|
||||||
ENV VERSION=$VERSION
|
ENV VERSION=$VERSION
|
||||||
@ -17,7 +17,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y software-properties-common \
|
&& apt-get install -y software-properties-common \
|
||||||
&& LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \
|
&& LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& bash -c "apt-get install -y php$PHP_VERSION-{cli,mysql,json,gd,xsl,bz2,opcache,apcu,tidy,zip,bcmath,mbstring,smbclient,ldap,curl,fpm,pgsql,gmp}" \
|
&& bash -c "apt-get install -y php$PHP_VERSION-{cli,mysql,json,gd,xsl,bz2,opcache,apcu,tidy,zip,bcmath,mbstring,smbclient,ldap,curl,fpm,pgsql,gmp,memcached}" \
|
||||||
# fpm and php.ini settings
|
# fpm and php.ini settings
|
||||||
&& sed -e 's/^;\?listen \?=.*/listen = 9000/g' \
|
&& sed -e 's/^;\?listen \?=.*/listen = 9000/g' \
|
||||||
-e '/allowed_clients/d' \
|
-e '/allowed_clients/d' \
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
DEFAULT_PHP_VERSION=7.4
|
||||||
|
PHP_VERSION=$DEFAULT_PHP_VERSION
|
||||||
|
|
||||||
|
if [[ $1 =~ ^[78]\.[0-9]$ ]]
|
||||||
|
then
|
||||||
|
PHP_VERSION=$1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
DEFAULT=$(git branch|grep ^*|cut -c3-)
|
DEFAULT=$(git branch|grep ^*|cut -c3-)
|
||||||
TAG=${1:-$DEFAULT}
|
TAG=${1:-$DEFAULT}
|
||||||
VERSION=$TAG
|
VERSION=$TAG
|
||||||
@ -15,18 +26,21 @@ BRANCH=$(echo $VERSION|sed 's/\.[0-9]\{8\}$//')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cd $(dirname $0)
|
# add PHP_VERSION to TAG, if not the default PHP version
|
||||||
|
[ $PHP_VERSION != $DEFAULT_PHP_VERSION ] && TAG=$TAG-$PHP_VERSION
|
||||||
|
|
||||||
docker pull ubuntu:20.04
|
docker pull ubuntu:20.04
|
||||||
docker build --no-cache --build-arg "VERSION=$VERSION" -t egroupware/egroupware:$TAG . && {
|
docker build --no-cache --build-arg "VERSION=$VERSION" --build-arg "PHP_VERSION=$PHP_VERSION" -t egroupware/egroupware:$TAG . && {
|
||||||
docker push egroupware/egroupware:$TAG
|
docker push egroupware/egroupware:$TAG
|
||||||
|
# further tags are only for the default PHP version
|
||||||
|
[ $PHP_VERSION != $DEFAULT_PHP_VERSION ] && exit
|
||||||
# tag only stable releases as latest
|
# tag only stable releases as latest
|
||||||
#[ $TAG != "master" ] && {
|
#[ $TAG != "master" ] && {
|
||||||
# docker tag egroupware/egroupware:$TAG egroupware/egroupware:latest
|
# docker tag egroupware/egroupware:$TAG egroupware/egroupware:latest
|
||||||
# docker push egroupware/egroupware:latest
|
# docker push egroupware/egroupware:latest
|
||||||
#}
|
#}
|
||||||
[ "$BRANCH" != $VERSION -a "${BRANCH}.x-dev" != $VERSION ] && {
|
[ "$BRANCH" != $VERSION -a "${BRANCH}.x-dev" != $VERSION ] && {
|
||||||
docker tag egroupware/egroupware:$VERSION egroupware/egroupware:$BRANCH
|
docker tag egroupware/egroupware:$TAG egroupware/egroupware:$BRANCH
|
||||||
docker push egroupware/egroupware:$BRANCH
|
docker push egroupware/egroupware:$BRANCH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=${VERSION:-dev-master}
|
VERSION=${VERSION:-dev-master}
|
||||||
PHP_VERSION=${PHP_VERSION:-7.3}
|
PHP_VERSION=${PHP_VERSION:-7.4}
|
||||||
|
|
||||||
# if EGW_APC_SHM_SIZE is set in environment, propagate value to apcu.ini, otherwise set default of 128M
|
# if EGW_APC_SHM_SIZE is set in environment, propagate value to apcu.ini, otherwise set default of 128M
|
||||||
grep "apc.shm_size" /etc/php/$PHP_VERSION/fpm/conf.d/20-apcu.ini >/dev/null && \
|
grep "apc.shm_size" /etc/php/$PHP_VERSION/fpm/conf.d/20-apcu.ini >/dev/null && \
|
||||||
|
Loading…
Reference in New Issue
Block a user