From f49ffba24c0f5528335d83ef4b3d93f6c384a729 Mon Sep 17 00:00:00 2001 From: Eric Aguayo Date: Mon, 15 Oct 2018 05:25:42 +0000 Subject: [PATCH 1/2] #54 Switching to official composer image for alpine version, also switching to use drush launcher for drush 9 as common practice is to require drush 9 as part of the project --- 7/alpine/Dockerfile | 3 +++ 9/alpine/Dockerfile | 11 +++++------ base/alpine/Dockerfile | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/7/alpine/Dockerfile b/7/alpine/Dockerfile index dbe1545..a6d25f4 100644 --- a/7/alpine/Dockerfile +++ b/7/alpine/Dockerfile @@ -8,5 +8,8 @@ ENV DRUSH_VERSION 7.3.0 # Install Drush using Composer. RUN composer global require drush/drush:"$DRUSH_VERSION" --prefer-dist +# Include bin path +ENV PATH="/tmp/vendor/bin:${PATH}" + # Display which version of Drush was installed RUN drush --version diff --git a/9/alpine/Dockerfile b/9/alpine/Dockerfile index b97e5fc..fb6e858 100644 --- a/9/alpine/Dockerfile +++ b/9/alpine/Dockerfile @@ -2,11 +2,10 @@ FROM drush/drush:base-alpine MAINTAINER Rob Loach -# Set the Drush version. -ENV DRUSH_VERSION 9.2.1 - -# Install Drush using Composer. -RUN composer global require drush/drush:"$DRUSH_VERSION" --prefer-dist +# Install Drush launcher +RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar && \ + chmod +x drush.phar && \ + mv drush.phar /usr/local/bin/drush # Display which version of Drush was installed. -RUN drush --version +RUN drush --version; exit 0 diff --git a/base/alpine/Dockerfile b/base/alpine/Dockerfile index 42d12a7..b1c8f1f 100644 --- a/base/alpine/Dockerfile +++ b/base/alpine/Dockerfile @@ -1,5 +1,5 @@ # Drush Docker Container -FROM composer/composer:alpine +FROM composer MAINTAINER Moses Liao # Add common extensions From b4b5c87e99b5a7f92101046d4ee6fe3fda176945 Mon Sep 17 00:00:00 2001 From: Eric Aguayo Date: Mon, 15 Oct 2018 05:43:05 +0000 Subject: [PATCH 2/2] #54 Using a different option for testing drush launcher version that will not trigger an error for not finding a drupal installation --- 9/alpine/Dockerfile | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/9/alpine/Dockerfile b/9/alpine/Dockerfile index fb6e858..f409740 100644 --- a/9/alpine/Dockerfile +++ b/9/alpine/Dockerfile @@ -8,4 +8,4 @@ RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/down mv drush.phar /usr/local/bin/drush # Display which version of Drush was installed. -RUN drush --version; exit 0 +RUN drush --drush-launcher-version diff --git a/Makefile b/Makefile index f388eb7..711f096 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ version: docker run drush/drush:7 --version docker run drush/drush:backdrop --version docker run drush/drush:alpine --version - docker run drush/drush:9-alpine --version + docker run drush/drush:9-alpine --drush-launcher-version docker run drush/drush:8-alpine --version docker run drush/drush:7-alpine --version docker run drush/drush:backdrop-alpine --version