Browse code

Merge pull request #6885 from tianon/standard-curl-sSL

Solomon Hykes authored on 2014/07/15 10:39:31
Showing 10 changed files
... ...
@@ -180,7 +180,7 @@ One way to automate this, is customize your git `commit.template` by adding
180 180
 a `prepare-commit-msg` hook to your Docker repository:
181 181
 
182 182
 ```
183
-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
183
+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
184 184
 ```
185 185
 
186 186
 * Note: the above script expects to find your GitHub user name in `git config --get github.user`
... ...
@@ -60,7 +60,7 @@ RUN	cd /usr/local/lvm2 && ./configure --enable-static_link && make device-mapper
60 60
 # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
61 61
 
62 62
 # Install Go
63
-RUN	curl -s https://go.googlecode.com/files/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz
63
+RUN	curl -sSL https://go.googlecode.com/files/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz
64 64
 ENV	PATH	/usr/local/go/bin:$PATH
65 65
 ENV	GOPATH	/go:/go/src/github.com/dotcloud/docker/vendor
66 66
 RUN	cd /usr/local/go/src && ./make.bash --no-clean 2>&1
... ...
@@ -133,7 +133,7 @@ Here's a typical Docker build process:
133 133
 FROM ubuntu:12.04
134 134
 RUN apt-get update
135 135
 RUN apt-get install -q -y python python-pip curl
136
-RUN curl -L https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv
136
+RUN curl -sSL https://github.com/shykes/helloflask/archive/master.tar.gz | tar -xzv
137 137
 RUN cd helloflask-master && pip install -r requirements.txt
138 138
 ```
139 139
 
... ...
@@ -19,12 +19,12 @@ tmp() {
19 19
 }
20 20
 
21 21
 apkv() {
22
-	curl -s $REPO/$ARCH/APKINDEX.tar.gz | tar -Oxz |
22
+	curl -sSL $REPO/$ARCH/APKINDEX.tar.gz | tar -Oxz |
23 23
 		grep '^P:apk-tools-static$' -A1 | tail -n1 | cut -d: -f2
24 24
 }
25 25
 
26 26
 getapk() {
27
-	curl -s $REPO/$ARCH/apk-tools-static-$(apkv).apk |
27
+	curl -sSL $REPO/$ARCH/apk-tools-static-$(apkv).apk |
28 28
 		tar -xz -C $TMP sbin/apk.static
29 29
 }
30 30
 
... ...
@@ -59,7 +59,7 @@ After that, we install and setup a few dependencies:
59 59
 
60 60
 Next, we add Basho's APT repository:
61 61
 
62
-    RUN curl -s http://apt.basho.com/gpg/basho.apt.key | apt-key add --
62
+    RUN curl -sSL http://apt.basho.com/gpg/basho.apt.key | apt-key add --
63 63
     RUN echo "deb http://apt.basho.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/basho.list
64 64
     RUN apt-get update
65 65
 
... ...
@@ -12,7 +12,7 @@ page_keywords: Docker, Docker documentation, installation, google, Google Comput
12 12
 2. Download and configure the [Google Cloud SDK][3] to use your
13 13
    project with the following commands:
14 14
 
15
-        $ curl https://sdk.cloud.google.com | bash
15
+        $ curl -sSL https://sdk.cloud.google.com | bash
16 16
         $ gcloud auth login
17 17
         $ gcloud config set project <google-cloud-project-id>
18 18
 
... ...
@@ -63,7 +63,7 @@ continue installation.*
63 63
 >
64 64
 > There is also a simple `curl` script available to help with this process.
65 65
 >
66
->     $ curl -s https://get.docker.io/ubuntu/ | sudo sh
66
+>     $ curl -sSL https://get.docker.io/ubuntu/ | sudo sh
67 67
 
68 68
 To verify that everything has worked as expected:
69 69
 
... ...
@@ -134,7 +134,7 @@ continue installation.*
134 134
 > 
135 135
 > There is also a simple `curl` script available to help with this process.
136 136
 > 
137
->     $ curl -s https://get.docker.io/ubuntu/ | sudo sh
137
+>     $ curl -sSL https://get.docker.io/ubuntu/ | sudo sh
138 138
 
139 139
 Now verify that the installation has worked by downloading the
140 140
 `ubuntu` image and launching a container.
... ...
@@ -195,7 +195,7 @@ Announcing on IRC in both `#docker` and `#docker-dev` is a great way to get
195 195
 help testing!  An easy way to get some useful links for sharing:
196 196
 
197 197
 ```bash
198
-echo "Ubuntu/Debian install script: curl -sLS https://test.docker.io/ | sh"
198
+echo "Ubuntu/Debian: https://test.docker.io/ubuntu or curl -sSL https://test.docker.io/ | sh"
199 199
 echo "Linux 64bit binary: https://test.docker.io/builds/Linux/x86_64/docker-${VERSION#v}"
200 200
 echo "Darwin/OSX 64bit client binary: https://test.docker.io/builds/Darwin/x86_64/docker-${VERSION#v}"
201 201
 echo "Darwin/OSX 32bit client binary: https://test.docker.io/builds/Darwin/i386/docker-${VERSION#v}"
... ...
@@ -2,7 +2,7 @@
2 2
 set -e
3 3
 #
4 4
 # This script is meant for quick & easy install via:
5
-#   'curl -sL https://get.docker.io/ | sh'
5
+#   'curl -sSL https://get.docker.io/ | sh'
6 6
 # or:
7 7
 #   'wget -qO- https://get.docker.io/ | sh'
8 8
 #
... ...
@@ -54,7 +54,7 @@ fi
54 54
 
55 55
 curl=''
56 56
 if command_exists curl; then
57
-	curl='curl -sL'
57
+	curl='curl -sSL'
58 58
 elif command_exists wget; then
59 59
 	curl='wget -qO-'
60 60
 elif command_exists busybox && busybox --list-modules | grep -q wget; then
... ...
@@ -133,7 +133,7 @@ case "$lsb_dist" in
133 133
 		if [ -z "$curl" ]; then
134 134
 			apt_get_update
135 135
 			( set -x; $sh_c 'sleep 3; apt-get install -y -q curl' )
136
-			curl='curl -sL'
136
+			curl='curl -sSL'
137 137
 		fi
138 138
 		(
139 139
 			set -x
... ...
@@ -282,10 +282,13 @@ if [ ! -e /usr/lib/apt/methods/https ]; then
282 282
 	apt-get update
283 283
 	apt-get install -y apt-transport-https
284 284
 fi
285
+
285 286
 # Add the repository to your APT sources
286 287
 echo deb $(s3_url)/ubuntu docker main > /etc/apt/sources.list.d/docker.list
288
+
287 289
 # Then import the repository key
288 290
 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
291
+
289 292
 # Install docker
290 293
 apt-get update ; apt-get install -y lxc-docker
291 294
 
... ...
@@ -318,7 +321,7 @@ release_binaries() {
318 318
 
319 319
 	cat <<EOF | write_to_s3 s3://$BUCKET/builds/index
320 320
 # To install, run the following command as root:
321
-curl -O $(s3_url)/builds/Linux/x86_64/docker-$VERSION && chmod +x docker-$VERSION && sudo mv docker-$VERSION /usr/local/bin/docker
321
+curl -sSL -O $(s3_url)/builds/Linux/x86_64/docker-$VERSION && chmod +x docker-$VERSION && sudo mv docker-$VERSION /usr/local/bin/docker
322 322
 # Then start docker in daemon mode:
323 323
 sudo /usr/local/bin/docker -d
324 324
 EOF