From 3af7364d207b0840028ee1e49ed0c912d2ac02a2 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Sat, 18 Oct 2014 19:44:12 -0300 Subject: [PATCH] fix(registry): use docker cache --- registry/Dockerfile | 7 +++++-- registry/build.sh | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/registry/Dockerfile b/registry/Dockerfile index 2b015fb759..e759779186 100644 --- a/registry/Dockerfile +++ b/registry/Dockerfile @@ -20,6 +20,9 @@ ENV SETTINGS_FLAVOR deis WORKDIR /app CMD ["/app/bin/boot"] EXPOSE 5000 -ADD . /app -RUN /app/build.sh +ADD build.sh /app/build.sh + +RUN DOCKER_BUILD=true /app/build.sh + +ADD . /app diff --git a/registry/build.sh b/registry/build.sh index deb0ef4fbc..452a1532f1 100755 --- a/registry/build.sh +++ b/registry/build.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash +if [[ -z $DOCKER_BUILD ]]; then + echo + echo "Note: this script is intended for use by the Dockerfile and not as a way to build the registry locally" + echo + exit 1 +fi + DEBIAN_FRONTEND=noninteractive sed -i 's/main$/main universe/' /etc/apt/sources.list