From ba564d1bd60a21adccaad437cecf026d186257a0 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 1 Jun 2015 11:33:07 +0800 Subject: [PATCH] fix --- scrapyd/onbuild/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scrapyd/onbuild/Dockerfile b/scrapyd/onbuild/Dockerfile index 75b81f6..25986f8 100644 --- a/scrapyd/onbuild/Dockerfile +++ b/scrapyd/onbuild/Dockerfile @@ -6,10 +6,10 @@ FROM vimagick/scrapyd MAINTAINER kev ONBUILD ADD ./*.txt /etc/scrapyd/ -ONBUILD RUN apt-get update \ - && cd /etc/scrapyd \ - && [[ -f packages.txt ]] && xargs -r apt-get install -y < packages.txt \ - && [[ -f dependencies.txt ]] && xargs -r apt-get install -y < dependencies.txt \ - && [[ -f requirements.txt ]] && pip install -r requirements.txt \ - && [[ -f dependencies.txt ]] && xargs -r apt-get purge -y --auto-remove < dependencies.txt \ - && rm -rf /usr/lib/apt/lists/* +ONBUILD RUN cd /etc/scrapyd \ + && [ -f packages.txt -o -f dependencies.txt ] && apt-get update \ + && [ -f packages.txt ] && xargs -r apt-get install -y < packages.txt \ + && [ -f dependencies.txt ] && xargs -r apt-get install -y < dependencies.txt \ + && [ -f requirements.txt ] && pip install -r requirements.txt \ + && [ -f dependencies.txt ] && xargs -r apt-get purge -y --auto-remove < dependencies.txt \ + && [ -f packages.txt -o -f dependencies.txt ] && rm -rf /var/lib/apt/lists/*