diff --git a/centos/Dockerfile b/centos/Dockerfile index f34da7f..e7045e2 100644 --- a/centos/Dockerfile +++ b/centos/Dockerfile @@ -7,14 +7,17 @@ ARG WHEELS ARG GIT_REPO=https://git.openstack.org/openstack/${PROJECT} ARG GIT_REF ARG GIT_REF_REPO=https://git.openstack.org/openstack/${PROJECT} -ARG SCRIPTS=https://github.com/yaodu/common/archive/0.1.2.tar.gz +ARG SCRIPTS_REPO=https://github.com/openstack/loci +ARG SCRIPTS_REF=master ARG OVERRIDE=override ADD $OVERRIDE / RUN set -x \ - && yum install --setopt=tsflags=nodocs -y python curl \ - && curl -sSL $SCRIPTS | tar xz -C /tmp/ --strip-components=2 \ - && /tmp/download.sh $DOCKER_REPO $DOCKER_TAG $WHEELS \ - && /tmp/install.sh $PROJECT $GIT_REPO $GIT_REF_REPO $GIT_REF \ - && /tmp/cleanup.sh + && yum install --setopt=tsflags=nodocs -y python curl git \ + && git init /tmp/common/ \ + && git --git-dir /tmp/common/.git fetch --depth 1 $SCRIPTS_REPO $SCRIPTS_REF \ + && git --work-tree /tmp/common --git-dir /tmp/common/.git checkout FETCH_HEAD \ + && /tmp/common/scripts/download.sh \ + && /tmp/common/scripts/install.sh \ + && /tmp/common/scripts/cleanup.sh diff --git a/debian/Dockerfile b/debian/Dockerfile index 29b9a91..a4a062c 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -7,15 +7,18 @@ ARG WHEELS ARG GIT_REPO=https://git.openstack.org/openstack/${PROJECT} ARG GIT_REF ARG GIT_REF_REPO=https://git.openstack.org/openstack/${PROJECT} -ARG SCRIPTS=https://github.com/yaodu/common/archive/0.1.2.tar.gz +ARG SCRIPTS_REPO=https://github.com/openstack/loci +ARG SCRIPTS_REF=master ARG OVERRIDE=override ADD $OVERRIDE / RUN set -x \ && apt-get update \ - && apt-get install -y --no-install-recommends python ca-certificates curl \ - && curl -sSL $SCRIPTS | tar xz -C /tmp/ --strip-components=2 \ - && /tmp/download.sh $DOCKER_REPO $DOCKER_TAG $WHEELS \ - && /tmp/install.sh $PROJECT $GIT_REPO $GIT_REF_REPO $GIT_REF \ - && /tmp/cleanup.sh + && apt-get install -y --no-install-recommends python ca-certificates curl git \ + && git init /tmp/common/ \ + && git --git-dir /tmp/common/.git fetch --depth 1 $SCRIPTS_REPO $SCRIPTS_REF \ + && git --work-tree /tmp/common --git-dir /tmp/common/.git checkout FETCH_HEAD \ + && /tmp/common/scripts/download.sh \ + && /tmp/common/scripts/install.sh \ + && /tmp/common/scripts/cleanup.sh diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index 4f5144a..ae82452 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -7,15 +7,18 @@ ARG WHEELS ARG GIT_REPO=https://git.openstack.org/openstack/${PROJECT} ARG GIT_REF ARG GIT_REF_REPO=https://git.openstack.org/openstack/${PROJECT} -ARG SCRIPTS=https://github.com/yaodu/common/archive/0.1.2.tar.gz +ARG SCRIPTS_REPO=https://github.com/openstack/loci +ARG SCRIPTS_REF=master ARG OVERRIDE=override ADD $OVERRIDE / RUN set -x \ && apt-get update \ - && apt-get install -y --no-install-recommends python ca-certificates curl \ - && curl -sSL $SCRIPTS | tar xz -C /tmp/ --strip-components=2 \ - && /tmp/download.sh $DOCKER_REPO $DOCKER_TAG $WHEELS \ - && /tmp/install.sh $PROJECT $GIT_REPO $GIT_REF_REPO $GIT_REF \ - && /tmp/cleanup.sh + && apt-get install -y --no-install-recommends python ca-certificates curl git \ + && git init /tmp/common/ \ + && git --git-dir /tmp/common/.git fetch --depth 1 $SCRIPTS_REPO $SCRIPTS_REF \ + && git --work-tree /tmp/common --git-dir /tmp/common/.git checkout FETCH_HEAD \ + && /tmp/common/scripts/download.sh \ + && /tmp/common/scripts/install.sh \ + && /tmp/common/scripts/cleanup.sh