Browse code

Switch Dockerfile to debian:jessie

Fixes broken-pipe issue when piping s3cmd to grep -q, by removing the -q
flag and redirecting to /dev/null instead.

Add net-tools for ifconfig, because some tests rely on ifconfig.

Harmonize all Dockerfiles in this direction.

Signed-off-by: Tibor Vass <tibor@docker.com>

Tibor Vass authored on 2016/02/13 01:56:11
Showing 7 changed files
... ...
@@ -23,7 +23,7 @@
23 23
 # the case. Therefore, you don't have to disable it anymore.
24 24
 #
25 25
 
26
-FROM ubuntu:trusty
26
+FROM debian:jessie
27 27
 
28 28
 # add zfs ppa
29 29
 RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 \
... ...
@@ -58,12 +58,13 @@ RUN apt-get update && apt-get install -y \
58 58
 	libsystemd-journal-dev \
59 59
 	libtool \
60 60
 	mercurial \
61
+	net-tools \
61 62
 	pkg-config \
62 63
 	python-dev \
63 64
 	python-mock \
64 65
 	python-pip \
65 66
 	python-websocket \
66
-	s3cmd=1.1.0* \
67
+	s3cmd=1.5.0* \
67 68
 	ubuntu-zfs \
68 69
 	xfsprogs \
69 70
 	libzfs-dev \
... ...
@@ -11,19 +11,11 @@
11 11
 # # Run the test suite:
12 12
 # docker run --privileged docker hack/make.sh test
13 13
 #
14
-# # Publish a release:
15
-# docker run --privileged \
16
-#  -e AWS_S3_BUCKET=baz \
17
-#  -e AWS_ACCESS_KEY=foo \
18
-#  -e AWS_SECRET_KEY=bar \
19
-#  -e GPG_PASSPHRASE=gloubiboulga \
20
-#  docker hack/release.sh
21
-#
22 14
 # Note: AppArmor used to mess with privileged mode, but this is no longer
23 15
 # the case. Therefore, you don't have to disable it anymore.
24 16
 #
25 17
 
26
-FROM aarch64/ubuntu:trusty
18
+FROM aarch64/debian:jessie
27 19
 
28 20
 # Packaged dependencies
29 21
 RUN apt-get update && apt-get install -y \
... ...
@@ -47,13 +39,13 @@ RUN apt-get update && apt-get install -y \
47 47
 	libsqlite3-dev \
48 48
 	libsystemd-journal-dev \
49 49
 	mercurial \
50
+	net-tools \
50 51
 	parallel \
51 52
 	pkg-config \
52 53
 	python-dev \
53 54
 	python-mock \
54 55
 	python-pip \
55 56
 	python-websocket \
56
-	s3cmd=1.1.0* \
57 57
 	--no-install-recommends
58 58
 
59 59
 # Install armhf loader to use armv6 binaries on armv8
... ...
@@ -11,19 +11,11 @@
11 11
 # # Run the test suite:
12 12
 # docker run --privileged docker hack/make.sh test
13 13
 #
14
-# # Publish a release:
15
-# docker run --privileged \
16
-#  -e AWS_S3_BUCKET=baz \
17
-#  -e AWS_ACCESS_KEY=foo \
18
-#  -e AWS_SECRET_KEY=bar \
19
-#  -e GPG_PASSPHRASE=gloubiboulga \
20
-#  docker hack/release.sh
21
-#
22 14
 # Note: AppArmor used to mess with privileged mode, but this is no longer
23 15
 # the case. Therefore, you don't have to disable it anymore.
24 16
 #
25 17
 
26
-FROM armhf/ubuntu:trusty
18
+FROM armhf/debian:jessie
27 19
 
28 20
 # Packaged dependencies
29 21
 RUN apt-get update && apt-get install -y \
... ...
@@ -23,6 +23,7 @@ RUN apt-get update && apt-get install -y \
23 23
 	libcap-dev \
24 24
 	libsqlite3-dev \
25 25
 	mercurial \
26
+	net-tools \
26 27
 	parallel \
27 28
 	python-dev \
28 29
 	python-mock \
... ...
@@ -11,14 +11,6 @@
11 11
 # # Run the test suite:
12 12
 # docker run --privileged docker hack/make.sh test
13 13
 #
14
-# # Publish a release:
15
-# docker run --privileged \
16
-#  -e AWS_S3_BUCKET=baz \
17
-#  -e AWS_ACCESS_KEY=foo \
18
-#  -e AWS_SECRET_KEY=bar \
19
-#  -e GPG_PASSPHRASE=gloubiboulga \
20
-#  docker hack/release.sh
21
-#
22 14
 # Note: AppArmor used to mess with privileged mode, but this is no longer
23 15
 # the case. Therefore, you don't have to disable it anymore.
24 16
 #
... ...
@@ -11,14 +11,6 @@
11 11
 # # Run the test suite:
12 12
 # docker run --privileged docker hack/make.sh test
13 13
 #
14
-# # Publish a release:
15
-# docker run --privileged \
16
-#  -e AWS_S3_BUCKET=baz \
17
-#  -e AWS_ACCESS_KEY=foo \
18
-#  -e AWS_SECRET_KEY=bar \
19
-#  -e GPG_PASSPHRASE=gloubiboulga \
20
-#  docker hack/release.sh
21
-#
22 14
 # Note: AppArmor used to mess with privileged mode, but this is no longer
23 15
 # the case. Therefore, you don't have to disable it anymore.
24 16
 #
... ...
@@ -81,7 +81,8 @@ setup_s3() {
81 81
 	# s3cmd has no useful exit status, so we cannot check that.
82 82
 	# Instead, we check if it outputs anything on standard output.
83 83
 	# (When there are problems, it uses standard error instead.)
84
-	s3cmd info "s3://$BUCKET" | grep -q .
84
+	# NOTE: for some reason on debian:jessie `s3cmd info ... | grep -q .` results in a broken pipe
85
+	s3cmd info "s3://$BUCKET" | grep . >/dev/null
85 86
 	# Make the bucket accessible through website endpoints.
86 87
 	s3cmd ws-create --ws-index index --ws-error error "s3://$BUCKET"
87 88
 }