瀏覽代碼

fix: laravel-horizon SSL

Tom Robertshaw 2 年之前
父節點
當前提交
c776c33645
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      laravel-horizon/Dockerfile

+ 7 - 3
laravel-horizon/Dockerfile

@@ -31,10 +31,14 @@ RUN apk --update add wget \
   cyrus-sasl-dev \
   cyrus-sasl-dev \
   libgsasl-dev \
   libgsasl-dev \
   oniguruma-dev \
   oniguruma-dev \
-  libressl \
-  libressl-dev \
   supervisor \
   supervisor \
-  procps
+  procps; \
+  if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "50600" ] || \
+     [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
+    apk --update add libressl libressl-dev; \
+  else \
+    apk --update add openssl-dev; \
+  fi
 
 
 RUN pecl channel-update pecl.php.net; \
 RUN pecl channel-update pecl.php.net; \
   docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \
   docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \