aboutsummaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
authorGravatar Sandro Jäckel <sandro.jaeckel@gmail.com> 2019-07-22 15:26:55 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-07-22 15:26:55 +0200
commit71270e4d5c7f0645a31a8dc7ccc56cea6a9711b0 (patch)
tree0ea411321a7280ecc50b3d345299bae5abe18d98 /Docker
parent0a297addc060692f163c2614aa9989f5840f494a (diff)
Replace curl healthcheck with pure php, apply haodlint suggestions (#2455)
Closes #2453
Diffstat (limited to 'Docker')
-rw-r--r--Docker/Dockerfile9
-rw-r--r--Docker/Dockerfile-Alpine5
-rw-r--r--Docker/Dockerfile-QEMU-ARM9
3 files changed, 12 insertions, 11 deletions
diff --git a/Docker/Dockerfile b/Docker/Dockerfile
index 1eac3687b..11a44797f 100644
--- a/Docker/Dockerfile
+++ b/Docker/Dockerfile
@@ -1,11 +1,12 @@
FROM ubuntu:19.04
ENV TZ UTC
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
-RUN apt update && \
- apt install --no-install-recommends -y \
- ca-certificates cron curl \
+RUN apt-get update && \
+ apt-get install --no-install-recommends -y \
+ ca-certificates cron \
apache2 libapache2-mod-php \
php-curl php-gmp php-intl php-mbstring php-xml php-zip \
php-sqlite3 php-mysql php-pgsql && \
@@ -56,4 +57,4 @@ CMD ([ -z "$CRON_MIN" ] || cron) && \
exec apache2 -D FOREGROUND
HEALTHCHECK --start-period=20s --interval=37s --timeout=5s --retries=3 \
- CMD curl -fsS 'http://localhost/i/' | grep -q 'jsonVars' || exit 1
+ CMD (php -r "readfile('http://localhost/i/');" | grep -q 'jsonVars') || exit 1
diff --git a/Docker/Dockerfile-Alpine b/Docker/Dockerfile-Alpine
index 1715ff778..32671c4ae 100644
--- a/Docker/Dockerfile-Alpine
+++ b/Docker/Dockerfile-Alpine
@@ -1,9 +1,8 @@
FROM alpine:3.10
ENV TZ UTC
-
+SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN apk add --no-cache \
- curl \
apache2 php7-apache2 \
php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \
php7-ctype php7-dom php7-fileinfo php7-iconv php7-json php7-session php7-simplexml php7-xmlreader php7-zlib \
@@ -53,4 +52,4 @@ CMD ([ -z "$CRON_MIN" ] || crond -d 6) && \
exec httpd -D FOREGROUND
HEALTHCHECK --start-period=20s --interval=37s --timeout=5s --retries=3 \
- CMD curl -fsS 'http://localhost/i/' | grep -q 'jsonVars' || exit 1
+ CMD (php -r "readfile('http://localhost/i/');" | grep -q 'jsonVars') || exit 1
diff --git a/Docker/Dockerfile-QEMU-ARM b/Docker/Dockerfile-QEMU-ARM
index 87a807350..ad3243b23 100644
--- a/Docker/Dockerfile-QEMU-ARM
+++ b/Docker/Dockerfile-QEMU-ARM
@@ -7,11 +7,12 @@ FROM arm32v7/ubuntu:19.04
COPY ./Docker/qemu-arm-* /usr/bin/
ENV TZ UTC
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
-RUN apt update && \
- apt install --no-install-recommends -y \
- ca-certificates cron curl \
+RUN apt-get update && \
+ apt-get install --no-install-recommends -y \
+ ca-certificates cron \
apache2 libapache2-mod-php \
php-curl php-gmp php-intl php-mbstring php-xml php-zip \
php-sqlite3 php-mysql php-pgsql && \
@@ -68,4 +69,4 @@ CMD ([ -z "$CRON_MIN" ] || cron) && \
exec apache2 -D FOREGROUND
HEALTHCHECK --start-period=20s --interval=37s --timeout=5s --retries=3 \
- CMD curl -fsS 'http://localhost/i/' | grep -q 'jsonVars' || exit 1
+ CMD (php -r "readfile('http://localhost/i/');" | grep -q 'jsonVars') || exit 1