diff --git a/Dockerfile b/Dockerfile index 3d93a3b..189c727 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,21 @@ MAINTAINER docker@stefan-van-essen.nl ENV LANG='en_US.UTF-8' LANGUAGE='en_US.UTF-8' TERM='xterm' DOCKER_HOST='docker' RUN apk -U --no-cache add \ + alpine-sdk \ + autoconf \ + automake \ + build-base \ curl \ - git \ docker \ + git \ + libjpeg-turbo \ + libjpeg-turbo-dev \ + libpng \ + libpng-dev \ + libwebp \ + libwebp-dev \ make \ - automake \ + nasm \ nodejs-current-npm \ php7 \ php7-ctype \ @@ -21,24 +31,12 @@ RUN apk -U --no-cache add \ php7-pdo_pgsql \ php7-pdo_sqlite \ php7-phar \ - php7-tokenizer \ php7-session \ php7-simplexml \ + php7-tokenizer \ php7-zip \ php7-zlib \ - alpine-sdk \ - nasm \ - autoconf \ - build-base \ - zlib \ - zlib-dev \ - libpng \ - libpng-dev \ - libwebp \ - libwebp-dev \ - libjpeg-turbo \ - libjpeg-turbo-dev \ - && curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && npm install -g yarn + && curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ + && npm install -g yarn COPY cache-tool.sh /usr/local/bin/cache-tool diff --git a/cache-tool.sh b/cache-tool.sh index 56969bc..73f03ed 100755 --- a/cache-tool.sh +++ b/cache-tool.sh @@ -17,11 +17,6 @@ function usage() { exit 1 } -function getCachePaths() { - IFS=: - set $1 -} - function collectCache() { IFS=: set $1 @@ -38,8 +33,8 @@ function extractCache() { IFS=: set $1 eval dir=$2 - if [ ! -d $1 ]; then - echo " ! Cache directory $1 does not exist, skipping..." + if [ ! -d .cache/$1 ]; then + echo " ! Cache directory .cache/$1 does not exist, skipping..." return fi echo " - Extracting .cache/$1 into $2..."; @@ -47,13 +42,13 @@ function extractCache() { cp -R .cache/$1 $dir } -# ==== Start of the program7 +# ==== Start of the program if [ $# -lt 2 ]; then usage; fi -if [[ "$1" -ne "collect" && "$1" -ne "extract" ]]; then +if [[ "$1" != "collect" && "$1" != "extract" ]]; then usage; fi