From 3e0fc7968fbeff683140b353fd611840064d81d7 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Tue, 27 Dec 2016 17:04:58 -0800 Subject: [PATCH] better git clones Signed-off-by: Jess Frazelle --- camlistore/Dockerfile | 2 +- cathode/Dockerfile | 2 +- consul/Dockerfile | 2 +- cpuminer/Dockerfile | 2 +- fontpatcher/Dockerfile | 2 +- gitiles/Dockerfile | 2 +- golang-softhsm2/Dockerfile | 4 +++- john/Dockerfile | 2 +- kernel-builder/install_kernel | 2 +- latest-versions.sh | 36 +++++++++++++++++++---------------- masscan/Dockerfile | 2 +- mdp/Dockerfile | 2 +- micro/Dockerfile | 2 +- mutt/Dockerfile | 4 ++-- node-sonos/Dockerfile | 2 +- plexpy/Dockerfile | 2 +- routersploit/Dockerfile | 2 +- ssr/Dockerfile | 2 +- telize/Dockerfile | 2 +- termboy/Dockerfile | 2 +- vault/Dockerfile | 2 +- watchman/Dockerfile | 4 +++- 22 files changed, 46 insertions(+), 38 deletions(-) diff --git a/camlistore/Dockerfile b/camlistore/Dockerfile index 270f9e5..aace3b9 100644 --- a/camlistore/Dockerfile +++ b/camlistore/Dockerfile @@ -20,7 +20,7 @@ RUN buildDeps=' \ && apk --no-cache add $buildDeps \ && mkdir -p /go/src/camlistore.googlesource.com \ && cd /go/src/camlistore.googlesource.com \ - && git clone --depth 1 -b "${CAMLISTORE_VERSION}" https://camlistore.googlesource.com/camlistore.git \ + && git clone --depth 1 --branch "${CAMLISTORE_VERSION}" https://camlistore.googlesource.com/camlistore.git \ && cd /go/src/camlistore.googlesource.com/camlistore \ && go run make.go \ && cp -r ./bin/* /usr/local/bin/ \ diff --git a/cathode/Dockerfile b/cathode/Dockerfile index fd98556..6afea4e 100644 --- a/cathode/Dockerfile +++ b/cathode/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* -RUN git clone --recursive https://github.com/Swordfish90/cool-retro-term.git /src +RUN git clone --depth 1 --recursive https://github.com/Swordfish90/cool-retro-term.git /src WORKDIR /src RUN qmake \ && make diff --git a/consul/Dockerfile b/consul/Dockerfile index 8947e8a..1abd015 100644 --- a/consul/Dockerfile +++ b/consul/Dockerfile @@ -30,7 +30,7 @@ RUN buildDeps=' \ && go get github.com/Soulou/curl-unix-socket \ && mv /go/bin/curl-unix-socket /usr/bin/ \ && mkdir -p /go/src/github.com/hashicorp /etc/consul.d \ - && git clone --branch ${CONSUL_VERSION} https://github.com/hashicorp/consul /go/src/github.com/hashicorp/consul \ + && git clone --depth 1 --branch ${CONSUL_VERSION} https://github.com/hashicorp/consul /go/src/github.com/hashicorp/consul \ && cd /go/src/github.com/hashicorp/consul \ && XC_ARCH="amd64" XC_OS="linux" make all \ && mv bin/consul /usr/bin/ \ diff --git a/cpuminer/Dockerfile b/cpuminer/Dockerfile index ab50d62..68571aa 100644 --- a/cpuminer/Dockerfile +++ b/cpuminer/Dockerfile @@ -15,7 +15,7 @@ RUN set -x \ curl-dev \ git \ openssl-dev \ - && git clone --branch "${CPUMINER_VERSION}" https://github.com/pooler/cpuminer.git /usr/src/cpuminer \ + && git clone --depth 1 --branch "${CPUMINER_VERSION}" https://github.com/pooler/cpuminer.git /usr/src/cpuminer \ && ( \ cd /usr/src/cpuminer \ && ./autogen.sh \ diff --git a/fontpatcher/Dockerfile b/fontpatcher/Dockerfile index fc01e67..a7e0755 100644 --- a/fontpatcher/Dockerfile +++ b/fontpatcher/Dockerfile @@ -13,7 +13,7 @@ RUN buildDeps=' \ set -x \ && apt-get update \ && apt-get install -y $buildDeps --no-install-recommends \ - && git clone -b develop --depth 1 https://github.com/Lokaltog/vim-powerline.git /pwrline \ + && git clone --depth 1 --branch develop https://github.com/Lokaltog/vim-powerline.git /pwrline \ && ( \ cd /pwrline \ && mv fontpatcher/fontpatcher /usr/bin/ \ diff --git a/gitiles/Dockerfile b/gitiles/Dockerfile index 17d6c3a..c610ad9 100644 --- a/gitiles/Dockerfile +++ b/gitiles/Dockerfile @@ -20,7 +20,7 @@ RUN buildDeps=' \ && ant \ && ln -snfv ${PWD}/bin/buck /usr/bin/buck \ ) \ - && git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /gitiles \ + && git clone --depth 1 --recurse-submodules https://gerrit.googlesource.com/gitiles /gitiles \ && ( \ cd /gitiles \ && touch .nobuckcheck \ diff --git a/golang-softhsm2/Dockerfile b/golang-softhsm2/Dockerfile index 9d850c2..d198eec 100644 --- a/golang-softhsm2/Dockerfile +++ b/golang-softhsm2/Dockerfile @@ -4,6 +4,8 @@ RUN apt-get update && apt-get install -y \ sqlite3 \ && rm -rf /var/lib/apt/lists/* +ENV SOFTHSM_VERSION 2.2.0 + RUN buildDeps=' \ autoconf \ automake \ @@ -15,7 +17,7 @@ RUN buildDeps=' \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ - && git clone https://github.com/opendnssec/SoftHSMv2.git /usr/src/SoftHSMv2 \ + && git clone --depth 1 --branch "${SOFTHSM_VERSION}" https://github.com/opendnssec/SoftHSMv2.git /usr/src/SoftHSMv2 \ && cd /usr/src/SoftHSMv2 \ && sh autogen.sh \ && ./configure --with-objectstore-backend-db \ diff --git a/john/Dockerfile b/john/Dockerfile index fe75c85..23ed319 100644 --- a/john/Dockerfile +++ b/john/Dockerfile @@ -24,7 +24,7 @@ RUN buildDeps=' \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ - && git clone https://github.com/magnumripper/JohnTheRipper.git /usr/src/johntheripper \ + && git clone --depth 1 https://github.com/magnumripper/JohnTheRipper.git /usr/src/johntheripper \ && cd /usr/src/johntheripper/src \ && ./configure || cat config.log \ && make \ diff --git a/kernel-builder/install_kernel b/kernel-builder/install_kernel index f3a171f..8c82a31 100755 --- a/kernel-builder/install_kernel +++ b/kernel-builder/install_kernel @@ -68,7 +68,7 @@ install_kernel(){ if [[ -d $aufsdir ]]; then rm -rf $aufsdir fi - git clone -b aufs${MAJOR_MINOR_VERSION} --single-branch --depth 1 https://github.com/sfjro/aufs4-standalone.git $aufsdir + git clone --depth 1 --branch aufs${MAJOR_MINOR_VERSION} --single-branch https://github.com/sfjro/aufs4-standalone.git $aufsdir fi if [[ "$OPT" == "grsec" ]]; then diff --git a/latest-versions.sh b/latest-versions.sh index 46d93ad..1228b80 100755 --- a/latest-versions.sh +++ b/latest-versions.sh @@ -25,14 +25,16 @@ get_latest() { local tag=$(echo $resp | jq --raw-output .[0].name) fi - if [[ "$name" == "null" ]]; then + if [[ "$name" == "null" ]] || [[ "$name" == "" ]]; then name="-" fi local dir=${repo#*/} if [[ "$dir" == "CouchPotatoServer" ]]; then - dir=couchpotato + dir="couchpotato" + elif [[ "$dir" == "SoftHSMv2" ]]; then + dir="golang-softhsm2" fi local current=$(cat "${dir}/Dockerfile" | grep -m 1 VERSION | awk '{print $(NF)}') @@ -45,25 +47,27 @@ get_latest() { } projects=( -apache/zookeeper atom/atom camlistore/camlistore -CouchPotato/CouchPotatoServer -curl/curl -fcambus/telize hashicorp/consul -hashicorp/vault -irssi/irssi -JonnyWong16/plexpy -microsoft/vscode -mitchellh/vagrant +CouchPotato/CouchPotatoServer pooler/cpuminer -powershell/powershell -reverse-shell/routersploit -ricochet-im/ricochet -tarsnap/tarsnap -znc/znc +curl/curl +opendnssec/SoftHSMv2 +irssi/irssi zyedidia/micro +JonnyWong16/plexpy +powershell/powershell +ricochet-im/ricochet +reverse-shell/routersploit +tarsnap/tarsnap +fcambus/telize +mitchellh/vagrant +hashicorp/vault +microsoft/vscode +facebook/watchman +znc/znc +apache/zookeeper ) main() { diff --git a/masscan/Dockerfile b/masscan/Dockerfile index dc8e857..85736eb 100644 --- a/masscan/Dockerfile +++ b/masscan/Dockerfile @@ -15,7 +15,7 @@ RUN buildDeps=' \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ - && git clone https://github.com/robertdavidgraham/masscan.git /usr/src/masscan \ + && git clone --depth 1 https://github.com/robertdavidgraham/masscan.git /usr/src/masscan \ && cd /usr/src/masscan \ && make \ && make install \ diff --git a/mdp/Dockerfile b/mdp/Dockerfile index d2eb111..e44297d 100644 --- a/mdp/Dockerfile +++ b/mdp/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* -RUN git clone --recursive https://github.com/visit1985/mdp.git /src +RUN git clone --depth 1 --recursive https://github.com/visit1985/mdp.git /src WORKDIR /src diff --git a/micro/Dockerfile b/micro/Dockerfile index 9cf79d0..5511aee 100644 --- a/micro/Dockerfile +++ b/micro/Dockerfile @@ -17,7 +17,7 @@ RUN buildDeps=' \ ' \ set -x \ && apk --no-cache add $buildDeps \ - && git clone --branch "$MICRO_VERSION" https://github.com/zyedidia/micro /go/src/github.com/zyedidia/micro \ + && git clone --depth 1 --branch "$MICRO_VERSION" https://github.com/zyedidia/micro /go/src/github.com/zyedidia/micro \ && cd /go/src/github.com/zyedidia/micro \ && mkdir -p /go/bin \ && make install \ diff --git a/mutt/Dockerfile b/mutt/Dockerfile index 1fcb46c..d2e3e6f 100644 --- a/mutt/Dockerfile +++ b/mutt/Dockerfile @@ -34,8 +34,8 @@ RUN mkdir -p $HOME/.mutt/cache/headers $HOME/.mutt/cache/bodies \ && touch $HOME/.mutt/certificates # vim settings -RUN git clone https://github.com/jessfraz/.vim.git $HOME/.vim \ - && git clone https://github.com/altercation/vim-colors-solarized $HOME/.vim/bundle/vim-colors-solarized \ +RUN git clone --depth 1 https://github.com/jessfraz/.vim.git $HOME/.vim \ + && git clone --depth 1 https://github.com/altercation/vim-colors-solarized $HOME/.vim/bundle/vim-colors-solarized \ && cp $HOME/.vim/vimrc $HOME/.vimrc ENV LANG C.UTF-8 diff --git a/node-sonos/Dockerfile b/node-sonos/Dockerfile index e64aef3..16a8c03 100644 --- a/node-sonos/Dockerfile +++ b/node-sonos/Dockerfile @@ -1,4 +1,4 @@ -FROM mhart/alpine-node:5 +FROM node:alpine RUN apk add --no-cache \ build-base \ diff --git a/plexpy/Dockerfile b/plexpy/Dockerfile index 5865bb5..c081f6c 100644 --- a/plexpy/Dockerfile +++ b/plexpy/Dockerfile @@ -19,7 +19,7 @@ RUN set -x \ && apk add --no-cache --virtual .build-deps \ git \ && mkdir -p /opt/plexpy \ - && git clone --branch "${PLEXPY_VERSION}" https://github.com/drzoidberg33/plexpy.git /opt/plexpy/ \ + && git clone --depth 1 --branch "${PLEXPY_VERSION}" https://github.com/drzoidberg33/plexpy.git /opt/plexpy/ \ && apk del .build-deps # Volume for Plexpy data. diff --git a/routersploit/Dockerfile b/routersploit/Dockerfile index 3a1622c..7e4b295 100644 --- a/routersploit/Dockerfile +++ b/routersploit/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \ python-bs4 \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ - && git clone --branch "${ROUTERSPLOIT_VERSION}" https://github.com/reverse-shell/routersploit /usr/bin/routersploit \ + && git clone --depth 1 --branch "${ROUTERSPLOIT_VERSION}" https://github.com/reverse-shell/routersploit /usr/bin/routersploit \ && apt-get purge -y --auto-remove \ git diff --git a/ssr/Dockerfile b/ssr/Dockerfile index a0d654d..31c1440 100644 --- a/ssr/Dockerfile +++ b/ssr/Dockerfile @@ -64,7 +64,7 @@ RUN cd /usr/lib/i386-linux-gnu && \ # --group ssr # clone source -RUN git clone https://github.com/MaartenBaert/ssr.git /src +RUN git clone --depth 1 https://github.com/MaartenBaert/ssr.git /src # install #RUN echo "ssr ALL = NOPASSWD: /src/simple-build-and-install" >> /etc/sudoers diff --git a/telize/Dockerfile b/telize/Dockerfile index 2289596..fb0d3b6 100644 --- a/telize/Dockerfile +++ b/telize/Dockerfile @@ -39,7 +39,7 @@ RUN buildDeps=' \ && curl -sSL http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -o /usr/share/GeoIP/GeoLiteCity.dat.gz \ && curl -sSL http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz -o /usr/share/GeoIP/GeoIPASNum.dat.gz \ && gunzip /usr/share/GeoIP/*gz \ - && git clone --branch "${TELIZE_VERSION}" https://github.com/fcambus/telize.git /usr/src/telize \ + && git clone --depth 1 --branch "${TELIZE_VERSION}" https://github.com/fcambus/telize.git /usr/src/telize \ && cd /usr/src/telize \ && cp timezone*.conf /etc/nginx/ \ && rm -rf /usr/src/telize \ diff --git a/termboy/Dockerfile b/termboy/Dockerfile index 05899d5..780e889 100644 --- a/termboy/Dockerfile +++ b/termboy/Dockerfile @@ -38,7 +38,7 @@ RUN apt-get update && apt-get install -y \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* -RUN git clone https://github.com/dobyrch/termboy --depth 1 /src \ +RUN git clone --depth 1 https://github.com/dobyrch/termboy /src \ && cd /src \ && make \ && make install || true diff --git a/vault/Dockerfile b/vault/Dockerfile index cabf85b..e1e74d3 100644 --- a/vault/Dockerfile +++ b/vault/Dockerfile @@ -24,7 +24,7 @@ RUN buildDeps=' \ set -x \ && apk --no-cache add --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \ && mkdir -p /go/src/github.com/hashicorp \ - && git clone --branch ${VAULT_VERSION} https://github.com/hashicorp/vault /go/src/github.com/hashicorp/vault \ + && git clone --depth 1 --branch ${VAULT_VERSION} https://github.com/hashicorp/vault /go/src/github.com/hashicorp/vault \ && cd /go/src/github.com/hashicorp/vault \ && go get github.com/mitchellh/gox \ && XC_ARCH="amd64" XC_OS="linux" XC_OSARCH="linux/amd64" make bin \ diff --git a/watchman/Dockerfile b/watchman/Dockerfile index eba30ce..c0636f5 100644 --- a/watchman/Dockerfile +++ b/watchman/Dockerfile @@ -6,6 +6,8 @@ RUN apt-get update && apt-get install -y \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* +ENV WATCHMAN_VERSION v4.7.0 + RUN buildDeps=' \ autoconf \ automake \ @@ -16,7 +18,7 @@ RUN buildDeps=' \ && set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ - && git clone https://github.com/facebook/watchman.git /usr/src/watchman \ + && git clone --depth 1 --branch "${WATCHMAN_VERSION}" https://github.com/facebook/watchman.git /usr/src/watchman \ && cd /usr/src/watchman \ && ./autogen.sh \ && ./configure \