From 9f61e233c6da72f692190f1f5eb672341253f3e7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 7 Jul 2014 10:35:38 -0600 Subject: [PATCH] Standardize "curl" arguments across the repo to be or include "-sSL" - https://botbot.me/freenode/docker-dev/msg/17315692/ - https://botbot.me/freenode/docker-dev/msg/17315994/ Docker-DCO-1.1-Signed-off-by: Andrew Page (github: tianon) --- CONTRIBUTING.md | 2 +- Dockerfile | 2 +- README.md | 2 +- contrib/mkimage-alpine.sh | 4 ++-- docs/sources/examples/running_riak_service.md | 2 +- docs/sources/installation/google.md | 2 +- docs/sources/installation/ubuntulinux.md | 4 ++-- hack/RELEASE-CHECKLIST.md | 2 +- hack/install.sh | 6 +++--- hack/release.sh | 5 ++++- 10 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d07b972eb7..cd673b9980 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -175,7 +175,7 @@ One way to automate this, is customise your get ``commit.template`` by adding a ``prepare-commit-msg`` hook to your docker checkout: ``` -curl -o .git/hooks/prepare-commit-msg https://raw.githubusercontent.com/dotcloud/docker/master/contrib/prepare-commit-msg.hook && chmod +x .git/hooks/prepare-commit-msg +curl -sSL -o .git/hooks/prepare-commit-msg https://raw.githubusercontent.com/dotcloud/docker/master/contrib/prepare-commit-msg.hook && chmod +x .git/hooks/prepare-commit-msg ``` * Note: the above script expects to find your GitHub user name in ``git config --get github.user`` diff --git a/Dockerfile b/Dockerfile index 283e0a3262..d2e32a4ae5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,7 +60,7 @@ RUN cd /usr/local/lvm2 && ./configure --enable-static_link && make device-mapper # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL # Install Go -RUN curl -s https://go.googlecode.com/files/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz +RUN curl -sSL https://go.googlecode.com/files/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz ENV PATH /usr/local/go/bin:$PATH ENV GOPATH /go:/go/src/github.com/dotcloud/docker/vendor RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1 diff --git a/README.md b/README.md index 3c378de6f4..08d839c3cc 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Here's a typical Docker build process: FROM ubuntu:12.04 RUN apt-get update RUN apt-get install -q -y python python-pip curl -RUN curl -L https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv +RUN curl -sSL https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv RUN cd helloflask-master && pip install -r requirements.txt ``` diff --git a/contrib/mkimage-alpine.sh b/contrib/mkimage-alpine.sh index 0bf328efa9..b9869ae61e 100755 --- a/contrib/mkimage-alpine.sh +++ b/contrib/mkimage-alpine.sh @@ -19,12 +19,12 @@ tmp() { } apkv() { - curl -s $REPO/$ARCH/APKINDEX.tar.gz | tar -Oxz | + curl -sSL $REPO/$ARCH/APKINDEX.tar.gz | tar -Oxz | grep '^P:apk-tools-static$' -A1 | tail -n1 | cut -d: -f2 } getapk() { - curl -s $REPO/$ARCH/apk-tools-static-$(apkv).apk | + curl -sSL $REPO/$ARCH/apk-tools-static-$(apkv).apk | tar -xz -C $TMP sbin/apk.static } diff --git a/docs/sources/examples/running_riak_service.md b/docs/sources/examples/running_riak_service.md index 5909b7e2b0..b2f9d99c49 100644 --- a/docs/sources/examples/running_riak_service.md +++ b/docs/sources/examples/running_riak_service.md @@ -59,7 +59,7 @@ After that, we install and setup a few dependencies: Next, we add Basho's APT repository: - RUN curl -s http://apt.basho.com/gpg/basho.apt.key | apt-key add -- + RUN curl -sSL http://apt.basho.com/gpg/basho.apt.key | apt-key add -- RUN echo "deb http://apt.basho.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/basho.list RUN apt-get update diff --git a/docs/sources/installation/google.md b/docs/sources/installation/google.md index b6c1b3d275..6c1e9b4f50 100644 --- a/docs/sources/installation/google.md +++ b/docs/sources/installation/google.md @@ -12,7 +12,7 @@ page_keywords: Docker, Docker documentation, installation, google, Google Comput 2. Download and configure the [Google Cloud SDK][3] to use your project with the following commands: - $ curl https://sdk.cloud.google.com | bash + $ curl -sSL https://sdk.cloud.google.com | bash $ gcloud auth login $ gcloud config set project diff --git a/docs/sources/installation/ubuntulinux.md b/docs/sources/installation/ubuntulinux.md index 5d1b6c3fbf..5ddc791f4f 100644 --- a/docs/sources/installation/ubuntulinux.md +++ b/docs/sources/installation/ubuntulinux.md @@ -63,7 +63,7 @@ continue installation.* > > There is also a simple `curl` script available to help with this process. > -> $ curl -s https://get.docker.io/ubuntu/ | sudo sh +> $ curl -sSL https://get.docker.io/ubuntu/ | sudo sh To verify that everything has worked as expected: @@ -134,7 +134,7 @@ continue installation.* > > There is also a simple `curl` script available to help with this process. > -> $ curl -s https://get.docker.io/ubuntu/ | sudo sh +> $ curl -sSL https://get.docker.io/ubuntu/ | sudo sh Now verify that the installation has worked by downloading the `ubuntu` image and launching a container. diff --git a/hack/RELEASE-CHECKLIST.md b/hack/RELEASE-CHECKLIST.md index 2fe1a3ce96..6dbff22bc4 100644 --- a/hack/RELEASE-CHECKLIST.md +++ b/hack/RELEASE-CHECKLIST.md @@ -181,7 +181,7 @@ Announcing on IRC in both `#docker` and `#docker-dev` is a great way to get help testing! An easy way to get some useful links for sharing: ```bash -echo "Ubuntu/Debian install script: curl -sLS https://test.docker.io/ | sh" +echo "Ubuntu/Debian: https://test.docker.io/ubuntu or curl -sSL https://test.docker.io/ | sh" echo "Linux 64bit binary: https://test.docker.io/builds/Linux/x86_64/docker-${VERSION#v}" echo "Darwin/OSX 64bit client binary: https://test.docker.io/builds/Darwin/x86_64/docker-${VERSION#v}" echo "Darwin/OSX 32bit client binary: https://test.docker.io/builds/Darwin/i386/docker-${VERSION#v}" diff --git a/hack/install.sh b/hack/install.sh index 43248cf2c0..641ec64155 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -2,7 +2,7 @@ set -e # # This script is meant for quick & easy install via: -# 'curl -sL https://get.docker.io/ | sh' +# 'curl -sSL https://get.docker.io/ | sh' # or: # 'wget -qO- https://get.docker.io/ | sh' # @@ -54,7 +54,7 @@ fi curl='' if command_exists curl; then - curl='curl -sL' + curl='curl -sSL' elif command_exists wget; then curl='wget -qO-' elif command_exists busybox && busybox --list-modules | grep -q wget; then @@ -133,7 +133,7 @@ case "$lsb_dist" in if [ -z "$curl" ]; then apt_get_update ( set -x; $sh_c 'sleep 3; apt-get install -y -q curl' ) - curl='curl -sL' + curl='curl -sSL' fi ( set -x diff --git a/hack/release.sh b/hack/release.sh index 8642a4edb9..2a6b3992ef 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -282,10 +282,13 @@ if [ ! -e /usr/lib/apt/methods/https ]; then apt-get update apt-get install -y apt-transport-https fi + # Add the repository to your APT sources echo deb $(s3_url)/ubuntu docker main > /etc/apt/sources.list.d/docker.list + # Then import the repository key apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 + # Install docker apt-get update ; apt-get install -y lxc-docker @@ -318,7 +321,7 @@ release_binaries() { cat <