浏览代码

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 9 年之前
父节点
当前提交
f27b5dda4a
共有 7 个文件被更改,包括 9 次插入38 次删除
  1. 3 2
      Dockerfile
  2. 2 10
      Dockerfile.aarch64
  3. 1 9
      Dockerfile.armhf
  4. 1 0
      Dockerfile.gccgo
  5. 0 8
      Dockerfile.ppc64le
  6. 0 8
      Dockerfile.s390x
  7. 2 1
      hack/release.sh

+ 3 - 2
Dockerfile

@@ -23,7 +23,7 @@
 # the case. Therefore, you don't have to disable it anymore.
 # the case. Therefore, you don't have to disable it anymore.
 #
 #
 
 
-FROM ubuntu:trusty
+FROM debian:jessie
 
 
 # add zfs ppa
 # add zfs ppa
 RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 \
 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 \
 	libsystemd-journal-dev \
 	libsystemd-journal-dev \
 	libtool \
 	libtool \
 	mercurial \
 	mercurial \
+	net-tools \
 	pkg-config \
 	pkg-config \
 	python-dev \
 	python-dev \
 	python-mock \
 	python-mock \
 	python-pip \
 	python-pip \
 	python-websocket \
 	python-websocket \
-	s3cmd=1.1.0* \
+	s3cmd=1.5.0* \
 	ubuntu-zfs \
 	ubuntu-zfs \
 	xfsprogs \
 	xfsprogs \
 	libzfs-dev \
 	libzfs-dev \

+ 2 - 10
Dockerfile.aarch64

@@ -11,19 +11,11 @@
 # # Run the test suite:
 # # Run the test suite:
 # docker run --privileged docker hack/make.sh test
 # docker run --privileged docker hack/make.sh test
 #
 #
-# # Publish a release:
-# docker run --privileged \
-#  -e AWS_S3_BUCKET=baz \
-#  -e AWS_ACCESS_KEY=foo \
-#  -e AWS_SECRET_KEY=bar \
-#  -e GPG_PASSPHRASE=gloubiboulga \
-#  docker hack/release.sh
-#
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # the case. Therefore, you don't have to disable it anymore.
 # the case. Therefore, you don't have to disable it anymore.
 #
 #
 
 
-FROM aarch64/ubuntu:trusty
+FROM aarch64/debian:jessie
 
 
 # Packaged dependencies
 # Packaged dependencies
 RUN apt-get update && apt-get install -y \
 RUN apt-get update && apt-get install -y \
@@ -47,13 +39,13 @@ RUN apt-get update && apt-get install -y \
 	libsqlite3-dev \
 	libsqlite3-dev \
 	libsystemd-journal-dev \
 	libsystemd-journal-dev \
 	mercurial \
 	mercurial \
+	net-tools \
 	parallel \
 	parallel \
 	pkg-config \
 	pkg-config \
 	python-dev \
 	python-dev \
 	python-mock \
 	python-mock \
 	python-pip \
 	python-pip \
 	python-websocket \
 	python-websocket \
-	s3cmd=1.1.0* \
 	--no-install-recommends
 	--no-install-recommends
 
 
 # Install armhf loader to use armv6 binaries on armv8
 # Install armhf loader to use armv6 binaries on armv8

+ 1 - 9
Dockerfile.armhf

@@ -11,19 +11,11 @@
 # # Run the test suite:
 # # Run the test suite:
 # docker run --privileged docker hack/make.sh test
 # docker run --privileged docker hack/make.sh test
 #
 #
-# # Publish a release:
-# docker run --privileged \
-#  -e AWS_S3_BUCKET=baz \
-#  -e AWS_ACCESS_KEY=foo \
-#  -e AWS_SECRET_KEY=bar \
-#  -e GPG_PASSPHRASE=gloubiboulga \
-#  docker hack/release.sh
-#
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # the case. Therefore, you don't have to disable it anymore.
 # the case. Therefore, you don't have to disable it anymore.
 #
 #
 
 
-FROM armhf/ubuntu:trusty
+FROM armhf/debian:jessie
 
 
 # Packaged dependencies
 # Packaged dependencies
 RUN apt-get update && apt-get install -y \
 RUN apt-get update && apt-get install -y \

+ 1 - 0
Dockerfile.gccgo

@@ -23,6 +23,7 @@ RUN apt-get update && apt-get install -y \
 	libcap-dev \
 	libcap-dev \
 	libsqlite3-dev \
 	libsqlite3-dev \
 	mercurial \
 	mercurial \
+	net-tools \
 	parallel \
 	parallel \
 	python-dev \
 	python-dev \
 	python-mock \
 	python-mock \

+ 0 - 8
Dockerfile.ppc64le

@@ -11,14 +11,6 @@
 # # Run the test suite:
 # # Run the test suite:
 # docker run --privileged docker hack/make.sh test
 # docker run --privileged docker hack/make.sh test
 #
 #
-# # Publish a release:
-# docker run --privileged \
-#  -e AWS_S3_BUCKET=baz \
-#  -e AWS_ACCESS_KEY=foo \
-#  -e AWS_SECRET_KEY=bar \
-#  -e GPG_PASSPHRASE=gloubiboulga \
-#  docker hack/release.sh
-#
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # the case. Therefore, you don't have to disable it anymore.
 # the case. Therefore, you don't have to disable it anymore.
 #
 #

+ 0 - 8
Dockerfile.s390x

@@ -11,14 +11,6 @@
 # # Run the test suite:
 # # Run the test suite:
 # docker run --privileged docker hack/make.sh test
 # docker run --privileged docker hack/make.sh test
 #
 #
-# # Publish a release:
-# docker run --privileged \
-#  -e AWS_S3_BUCKET=baz \
-#  -e AWS_ACCESS_KEY=foo \
-#  -e AWS_SECRET_KEY=bar \
-#  -e GPG_PASSPHRASE=gloubiboulga \
-#  docker hack/release.sh
-#
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # Note: AppArmor used to mess with privileged mode, but this is no longer
 # the case. Therefore, you don't have to disable it anymore.
 # the case. Therefore, you don't have to disable it anymore.
 #
 #

+ 2 - 1
hack/release.sh

@@ -81,7 +81,8 @@ setup_s3() {
 	# s3cmd has no useful exit status, so we cannot check that.
 	# s3cmd has no useful exit status, so we cannot check that.
 	# Instead, we check if it outputs anything on standard output.
 	# Instead, we check if it outputs anything on standard output.
 	# (When there are problems, it uses standard error instead.)
 	# (When there are problems, it uses standard error instead.)
-	s3cmd info "s3://$BUCKET" | grep -q .
+	# NOTE: for some reason on debian:jessie `s3cmd info ... | grep -q .` results in a broken pipe
+	s3cmd info "s3://$BUCKET" | grep . >/dev/null
 	# Make the bucket accessible through website endpoints.
 	# Make the bucket accessible through website endpoints.
 	s3cmd ws-create --ws-index index --ws-error error "s3://$BUCKET"
 	s3cmd ws-create --ws-index index --ws-error error "s3://$BUCKET"
 }
 }