mirror of
https://github.com/friendica/docker
synced 2025-01-21 10:23:16 +01:00
Fix /bin/sh errors
This commit is contained in:
parent
8d5f6d63ea
commit
46ec7f08db
19 changed files with 69 additions and 69 deletions
|
@ -95,7 +95,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install apcu-5.1.21; \
|
pecl install apcu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -81,7 +81,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install APCu-5.1.21; \
|
pecl install APCu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -95,7 +95,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install apcu-5.1.21; \
|
pecl install apcu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -95,7 +95,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install apcu-5.1.21; \
|
pecl install apcu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -81,7 +81,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install APCu-5.1.21; \
|
pecl install APCu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -95,7 +95,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install apcu-5.1.21; \
|
pecl install apcu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -95,7 +95,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install apcu-5.1.21; \
|
pecl install apcu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -81,7 +81,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install APCu-5.1.21; \
|
pecl install APCu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -95,7 +95,7 @@ RUN set -ex; \
|
||||||
# pecl will claim success even if one install fails, so we need to perform each install separately
|
# pecl will claim success even if one install fails, so we need to perform each install separately
|
||||||
pecl install apcu-5.1.21; \
|
pecl install apcu-5.1.21; \
|
||||||
pecl install memcached-3.1.5; \
|
pecl install memcached-3.1.5; \
|
||||||
pecl install redis-5.3.6; \
|
pecl install redis-5.3.7; \
|
||||||
pecl install imagick-3.7.0; \
|
pecl install imagick-3.7.0; \
|
||||||
\
|
\
|
||||||
docker-php-ext-enable \
|
docker-php-ext-enable \
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
|
@ -20,11 +20,11 @@ version_greater() {
|
||||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||||
file_env() {
|
file_env() {
|
||||||
local var="$1"
|
var="$1"
|
||||||
local fileVar="${var}_FILE"
|
fileVar="${var}_FILE"
|
||||||
local def="${2:-}"
|
def="${2:-}"
|
||||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -49,7 +49,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
file_env REDIS_PW
|
file_env REDIS_PW
|
||||||
echo 'session.save_handler = redis'
|
echo 'session.save_handler = redis'
|
||||||
# check if redis host is an unix socket path
|
# check if redis host is an unix socket path
|
||||||
if [ "${REDIS_HOST:0:1}" = "/" ]; then
|
if expr "${REDIS_HOST}" : "/" 1>/dev/null; then
|
||||||
if [ -n "${REDIS_PW+x}" ]; then
|
if [ -n "${REDIS_PW+x}" ]; then
|
||||||
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
echo "session.save_path = \"unix://${REDIS_HOST}?auth=${REDIS_PW}\""
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue