From 4ccbc259fe870eb54a193190a2872935640b46c5 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 6 Aug 2013 20:46:50 -0700 Subject: [PATCH 01/27] Deprecate dockerbuilder in favor of a standard Dockerfile Upstream-commit: aa2ab5143b82cb63e061fe735b8c9ca9f84e0c55 Component: engine --- .../engine/hack/dockerbuilder/Dockerfile | 36 ---------------- .../engine/hack/dockerbuilder/MAINTAINERS | 1 - .../engine/hack/dockerbuilder/dockerbuilder | 42 ------------------- 3 files changed, 79 deletions(-) delete mode 100644 components/engine/hack/dockerbuilder/Dockerfile delete mode 100644 components/engine/hack/dockerbuilder/MAINTAINERS delete mode 100644 components/engine/hack/dockerbuilder/dockerbuilder diff --git a/components/engine/hack/dockerbuilder/Dockerfile b/components/engine/hack/dockerbuilder/Dockerfile deleted file mode 100644 index 496ee45e7a..0000000000 --- a/components/engine/hack/dockerbuilder/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -# DESCRIPTION Build a container capable of producing official binary and -# PPA packages and uploading them to S3 and Launchpad -# VERSION 1.2 -# DOCKER_VERSION 0.4 -# AUTHOR Solomon Hykes -# Daniel Mizyrycki -# BUILD_CMD docker build -t dockerbuilder . -# RUN_CMD docker run -e AWS_ID="$AWS_ID" -e AWS_KEY="$AWS_KEY" -e GPG_KEY="$GPG_KEY" -e PUBLISH_PPA="$PUBLISH_PPA" dockerbuilder -# -# ENV_VARIABLES AWS_ID, AWS_KEY: S3 credentials for uploading Docker binary and tarball -# GPG_KEY: Signing key for docker package -# PUBLISH_PPA: 0 for staging release, 1 for production release -# -from ubuntu:12.04 -maintainer Solomon Hykes -# Workaround the upstart issue -run dpkg-divert --local --rename --add /sbin/initctl -run ln -s /bin/true /sbin/initctl -# Enable universe and gophers PPA -run DEBIAN_FRONTEND=noninteractive apt-get install -y -q python-software-properties -run add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" -run add-apt-repository -y ppa:dotcloud/docker-golang/ubuntu -run apt-get update -# Packages required to checkout, build and upload docker -run DEBIAN_FRONTEND=noninteractive apt-get install -y -q s3cmd curl -run curl -s -o /go.tar.gz https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz -run tar -C /usr/local -xzf /go.tar.gz -run echo "export PATH=/usr/local/go/bin:$PATH" > /.bashrc -run echo "export PATH=/usr/local/go/bin:$PATH" > /.bash_profile -run DEBIAN_FRONTEND=noninteractive apt-get install -y -q git build-essential -# Packages required to build an ubuntu package -run DEBIAN_FRONTEND=noninteractive apt-get install -y -q golang-stable debhelper autotools-dev devscripts -# Copy dockerbuilder files into the container -add . /src -run cp /src/dockerbuilder /usr/local/bin/ && chmod +x /usr/local/bin/dockerbuilder -cmd ["dockerbuilder"] diff --git a/components/engine/hack/dockerbuilder/MAINTAINERS b/components/engine/hack/dockerbuilder/MAINTAINERS deleted file mode 100644 index 5dfc881420..0000000000 --- a/components/engine/hack/dockerbuilder/MAINTAINERS +++ /dev/null @@ -1 +0,0 @@ -Daniel Mizyrycki (@mzdaniel) diff --git a/components/engine/hack/dockerbuilder/dockerbuilder b/components/engine/hack/dockerbuilder/dockerbuilder deleted file mode 100644 index 9fa05ce11e..0000000000 --- a/components/engine/hack/dockerbuilder/dockerbuilder +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -set -x -set -e - -export PATH=/usr/local/go/bin:$PATH - -PACKAGE=github.com/dotcloud/docker - -if [ $# -gt 1 ]; then - echo "Usage: $0 [REVISION]" - exit 1 -fi - -export REVISION=$1 - -if [ -z "$AWS_ID" -o -z "$AWS_KEY" ]; then - echo "Warning: either AWS_ID or AWS_KEY environment variable not set. Won't upload to S3." -else - /bin/echo -e "[default]\naccess_key = $AWS_ID\nsecret_key = $AWS_KEY\n" > /.s3cfg -fi - -if [ -z "$GPG_KEY" ]; then - echo "Warning: environment variable GPG_KEY is not set. Ubuntu package upload will not succeed." - NO_UBUNTU=1 -fi - -rm -fr docker-release -git clone https://github.com/dotcloud/docker docker-release -cd docker-release -if [ -z "$REVISION" ]; then - make release -else - make release RELEASE_VERSION=$REVISION -fi - -# Remove credentials from container -rm -f /.s3cfg - -if [ -z "$NO_UBUNTU" ]; then - export PATH=`echo $PATH | sed 's#/usr/local/go/bin:##g'` - (cd packaging/ubuntu && make ubuntu) -fi From 0bebe41d5ec07ea706d1a49dc25f3ca04a6a7400 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 6 Aug 2013 20:49:55 -0700 Subject: [PATCH 02/27] Move VERSION to a dedicated file to facilitate automated builds and releases Upstream-commit: 9087ef9a770789e6987cd1ca4396d6b20a446724 Component: engine --- components/engine/VERSION | 1 + components/engine/commands.go | 3 +-- components/engine/docker/docker.go | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 components/engine/VERSION diff --git a/components/engine/VERSION b/components/engine/VERSION new file mode 100644 index 0000000000..53978e5317 --- /dev/null +++ b/components/engine/VERSION @@ -0,0 +1 @@ +0.5.1-dev diff --git a/components/engine/commands.go b/components/engine/commands.go index 899a8e2f1a..e538fc7765 100644 --- a/components/engine/commands.go +++ b/components/engine/commands.go @@ -27,10 +27,9 @@ import ( "unicode" ) -const VERSION = "0.5.3-dev" - var ( GITCOMMIT string + VERSION string ) func (cli *DockerCli) getMethod(name string) (reflect.Method, bool) { diff --git a/components/engine/docker/docker.go b/components/engine/docker/docker.go index a48865bfa3..bd1b4e9333 100644 --- a/components/engine/docker/docker.go +++ b/components/engine/docker/docker.go @@ -16,6 +16,7 @@ import ( var ( GITCOMMIT string + VERSION string ) func main() { @@ -52,6 +53,7 @@ func main() { os.Setenv("DEBUG", "1") } docker.GITCOMMIT = GITCOMMIT + docker.VERSION = VERSION if *flDaemon { if flag.NArg() != 0 { flag.Usage() From 436a1e7c859c5d9e02c823e04a3e4a861c698edd Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 6 Aug 2013 20:51:12 -0700 Subject: [PATCH 03/27] docker -v: show version and build information without making remote connections Upstream-commit: 9fce6f662ae3e31832bbc45938e509824bea67d5 Component: engine --- components/engine/docker/docker.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/engine/docker/docker.go b/components/engine/docker/docker.go index bd1b4e9333..6ac0c9379d 100644 --- a/components/engine/docker/docker.go +++ b/components/engine/docker/docker.go @@ -26,6 +26,7 @@ func main() { return } // FIXME: Switch d and D ? (to be more sshd like) + flVersion := flag.Bool("v", false, "Print version information and quit") flDaemon := flag.Bool("d", false, "Daemon mode") flDebug := flag.Bool("D", false, "Debug mode") flAutoRestart := flag.Bool("r", false, "Restart previously running containers") @@ -37,6 +38,10 @@ func main() { flHosts := docker.ListOpts{fmt.Sprintf("unix://%s", docker.DEFAULTUNIXSOCKET)} flag.Var(&flHosts, "H", "tcp://host:port to bind/connect to or unix://path/to/socket to use") flag.Parse() + if *flVersion { + showVersion() + return + } if len(flHosts) > 1 { flHosts = flHosts[1:] //trick to display a nice default value in the usage } @@ -76,6 +81,10 @@ func main() { } } +func showVersion() { + fmt.Printf("Docker version %s, build %s\n", VERSION, GITCOMMIT) +} + func createPidFile(pidfile string) error { if pidString, err := ioutil.ReadFile(pidfile); err == nil { pid, err := strconv.Atoi(string(pidString)) From 4299704169abb330f20c38d34597750c17a320f5 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 6 Aug 2013 21:00:50 -0700 Subject: [PATCH 04/27] Good-bye, ugly mega-Makefile. Docker can now be built with docker, with the help of a simple very simple shell script. Upstream-commit: 89ee5242291c50402973ffb73fe1dbbf5820e44c Component: engine --- components/engine/Dockerfile | 21 ++++---- components/engine/Makefile | 95 --------------------------------- components/engine/make.sh | 100 +++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 105 deletions(-) delete mode 100644 components/engine/Makefile create mode 100755 components/engine/make.sh diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index a7a7724ce5..1905f056a8 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -3,6 +3,8 @@ docker-version 0.4.2 from ubuntu:12.04 maintainer Solomon Hykes # Build dependencies +run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list +run apt-get update run apt-get install -y -q curl run apt-get install -y -q git # Install Go @@ -11,24 +13,23 @@ env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bi env GOPATH /go env CGO_ENABLED 0 run cd /tmp && echo 'package main' > t.go && go test -a -i -v +# Ubuntu stuff +run apt-get install -y -q ruby1.9.3 rubygems +run gem install fpm +run apt-get install -y -q reprepro +# Install s3cmd 1.0.1 (earlier versions don't support env variables in the config) +run apt-get install -y -q python-pip +run pip install s3cmd +run /bin/echo -e '[default]\naccess_key=$AWS_ID\nsecret_key=$AWS_KEY\n' > /.s3cfg # Download dependencies run PKG=github.com/kr/pty REV=27435c699; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV run PKG=github.com/gorilla/context/ REV=708054d61e5; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV run PKG=github.com/gorilla/mux/ REV=9b36453141c; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV run PKG=github.com/dotcloud/tar/ REV=d06045a6d9; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV -# Run dependencies -run apt-get install -y iptables -# lxc requires updating ubuntu sources -run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list -run apt-get update -run apt-get install -y lxc -run apt-get install -y aufs-tools # Docker requires code.google.com/p/go.net/websocket run apt-get install -y -q mercurial run PKG=code.google.com/p/go.net REV=78ad7f42aa2e; hg clone https://$PKG /go/src/$PKG && cd /go/src/$PKG && hg checkout -r $REV # Upload docker source add . /go/src/github.com/dotcloud/docker # Build the binary -run cd /go/src/github.com/dotcloud/docker/docker && go install -ldflags "-X main.GITCOMMIT '??' -d -w" -env PATH /usr/local/go/bin:/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin -cmd ["docker"] +run cd /go/src/github.com/dotcloud/docker && ./make.sh diff --git a/components/engine/Makefile b/components/engine/Makefile deleted file mode 100644 index dd365dc30e..0000000000 --- a/components/engine/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -DOCKER_PACKAGE := github.com/dotcloud/docker -RELEASE_VERSION := $(shell git tag | grep -E "v[0-9\.]+$$" | sort -nr | head -n 1) -SRCRELEASE := docker-$(RELEASE_VERSION) -BINRELEASE := docker-$(RELEASE_VERSION).tgz -BUILD_SRC := build_src -BUILD_PATH := ${BUILD_SRC}/src/${DOCKER_PACKAGE} - -GIT_ROOT := $(shell git rev-parse --show-toplevel) -BUILD_DIR := $(CURDIR)/.gopath - -GOPATH ?= $(BUILD_DIR) -export GOPATH - -GO_OPTIONS ?= -a -ldflags='-w -d' -ifeq ($(VERBOSE), 1) -GO_OPTIONS += -v -endif - -GIT_COMMIT = $(shell git rev-parse --short HEAD) -GIT_STATUS = $(shell test -n "`git status --porcelain`" && echo "+CHANGES") - -BUILD_OPTIONS = -a -ldflags "-X main.GITCOMMIT $(GIT_COMMIT)$(GIT_STATUS) -d -w" - -SRC_DIR := $(GOPATH)/src - -DOCKER_DIR := $(SRC_DIR)/$(DOCKER_PACKAGE) -DOCKER_MAIN := $(DOCKER_DIR)/docker - -DOCKER_BIN_RELATIVE := bin/docker -DOCKER_BIN := $(CURDIR)/$(DOCKER_BIN_RELATIVE) - -.PHONY: all clean test hack release srcrelease $(BINRELEASE) $(SRCRELEASE) $(DOCKER_BIN) $(DOCKER_DIR) - -all: $(DOCKER_BIN) - -$(DOCKER_BIN): $(DOCKER_DIR) - @mkdir -p $(dir $@) - @(cd $(DOCKER_MAIN); CGO_ENABLED=0 go build $(GO_OPTIONS) $(BUILD_OPTIONS) -o $@) - @echo $(DOCKER_BIN_RELATIVE) is created. - -$(DOCKER_DIR): - @mkdir -p $(dir $@) - @if [ -h $@ ]; then rm -f $@; fi; ln -sf $(CURDIR)/ $@ - @(cd $(DOCKER_MAIN); go get -d $(GO_OPTIONS)) - -whichrelease: - echo $(RELEASE_VERSION) - -release: $(BINRELEASE) - s3cmd -P put $(BINRELEASE) s3://get.docker.io/builds/`uname -s`/`uname -m`/docker-$(RELEASE_VERSION).tgz - s3cmd -P put docker-latest.tgz s3://get.docker.io/builds/`uname -s`/`uname -m`/docker-latest.tgz - s3cmd -P put $(SRCRELEASE)/bin/docker s3://get.docker.io/builds/`uname -s`/`uname -m`/docker - echo $(RELEASE_VERSION) > latest ; s3cmd -P put latest s3://get.docker.io/latest ; rm latest - -srcrelease: $(SRCRELEASE) -deps: $(DOCKER_DIR) - -# A clean checkout of $RELEASE_VERSION, with vendored dependencies -$(SRCRELEASE): - rm -fr $(SRCRELEASE) - git clone $(GIT_ROOT) $(SRCRELEASE) - cd $(SRCRELEASE); git checkout -q $(RELEASE_VERSION) - -# A binary release ready to be uploaded to a mirror -$(BINRELEASE): $(SRCRELEASE) - rm -f $(BINRELEASE) - cd $(SRCRELEASE); make; cp -R bin docker-$(RELEASE_VERSION); tar -f ../$(BINRELEASE) -zv -c docker-$(RELEASE_VERSION) - cd $(SRCRELEASE); cp -R bin docker-latest; tar -f ../docker-latest.tgz -zv -c docker-latest -clean: - @rm -rf $(dir $(DOCKER_BIN)) -ifeq ($(GOPATH), $(BUILD_DIR)) - @rm -rf $(BUILD_DIR) -else ifneq ($(DOCKER_DIR), $(realpath $(DOCKER_DIR))) - @rm -f $(DOCKER_DIR) -endif - -test: - # Copy docker source and dependencies for testing - rm -rf ${BUILD_SRC}; mkdir -p ${BUILD_PATH} - tar --exclude=${BUILD_SRC} -cz . | tar -xz -C ${BUILD_PATH} - GOPATH=${CURDIR}/${BUILD_SRC} go get -d - # Do the test - sudo -E GOPATH=${CURDIR}/${BUILD_SRC} CGO_ENABLED=0 go test ${GO_OPTIONS} - -testall: all - @(cd $(DOCKER_DIR); CGO_ENABLED=0 sudo -E go test ./... $(GO_OPTIONS)) - -fmt: - @gofmt -s -l -w . - -hack: - cd $(CURDIR)/hack && vagrant up - -ssh-dev: - cd $(CURDIR)/hack && vagrant ssh diff --git a/components/engine/make.sh b/components/engine/make.sh new file mode 100755 index 0000000000..8365b7bc2a --- /dev/null +++ b/components/engine/make.sh @@ -0,0 +1,100 @@ +#!/bin/sh + +# This script builds various binary artifacts from a checkout of the docker source code. +# +# Requirements: +# - The current directory should be a checkout of the docker source code (http://github.com/dotcloud/docker). Whatever version is checked out will be built. +# - The script is intented to be run as part of a docker build, as defined in the Dockerfile at the root of the source. +# - If you don't call this script from the official Dockerfile, or a container built by the official Dockerfile, you're probably doing it wrong. +# + +set -e +set -x + +VERSION=`cat ./VERSION` +GIT_COMMIT=$(git rev-parse --short HEAD) +GIT_CHANGES=$(test -n "`git status --porcelain`" && echo "+CHANGES") + +# "bundles" indicate the different types of build artifacts: static binary, ubuntu package, etc. + +# Build docker as a static binary file +bundle_binary() { + mkdir -p bundles/$VERSION/binary + go build -o bundles/$VERSION/binary/docker-$VERSION -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" ./docker +} + + +# Build docker's test suite as a collection of binary files (one per sub-package to test) +bundle_test() { + mkdir -p bundles/$VERSION/test + for test_dir in `find_test_dirs`; do + test_binary=` + cd $test_dir + go test -c -v -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" >&2 + find . -maxdepth 1 -type f -name '*.test' -executable + ` + cp $test_dir/$test_binary bundles/$VERSION/test/ + done + +} + +# Build docker as an ubuntu package using FPM and REPREPRO (sue me). +# bundle_binary must be called first. +bundle_ubuntu() { + mkdir -p bundles/$VERSION/ubuntu + + DIR=$(mktemp -d) + + # Generate an upstart config file (ubuntu-specific) + mkdir -p $DIR/etc/init + cat > $DIR/etc/init/docker.conf < $APTDIR/conf/distributions < Date: Tue, 6 Aug 2013 21:16:13 -0700 Subject: [PATCH 05/27] release.sh: publish a full release of docker to a S3 bucket, including static binary and a full APT repository with install instructions Upstream-commit: ccc3969536f875719fca446fa5ad8f69557dbe84 Component: engine --- components/engine/release.sh | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100755 components/engine/release.sh diff --git a/components/engine/release.sh b/components/engine/release.sh new file mode 100755 index 0000000000..e9acc2a1e1 --- /dev/null +++ b/components/engine/release.sh @@ -0,0 +1,81 @@ +#!/bin/sh + +# This script looks for bundles built by make.sh, and releases them on a public S3 bucket. +# +# Bundles should be available for the VERSION string passed as argument. +# +# The correct way to call this script is inside a container built by the official Dockerfile +# at the root of the docker source code. The Dockerfile, make.sh and release.sh should all +# be from the same source code revision. + +set -x +set -e + +# Print a usage message and exit. +usage() { + echo "Usage: $0 VERSION BUCKET" + echo "For example: $0 0.5.1-dev sandbox.get.docker.io" + exit 1 +} + +VERSION=$1 +BUCKET=$2 +[ -z "$VERSION" ] && usage +[ -z "$BUCKET" ] && usage + +setup_s3() { + # Try creating the bucket. Ignore errors (it might already exist). + s3cmd --acl-public mb $BUCKET 2>/dev/null || true +} + +# write_to_s3 uploads the contents of standard input to the specified S3 url. +write_to_s3() { + DEST=$1 + F=`mktemp` + cat > $F + s3cmd --acl-public put $F $DEST + rm -f $F +} + +s3_url() { + echo "http://$BUCKET.s3.amazonaws.com" +} + +# Upload the 'ubuntu' bundle to S3: +# 1. A full APT repository is published at $BUCKET/ubuntu/ +# 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/info +release_ubuntu() { + s3cmd --acl-public --verbose --delete-removed --follow-symlinks sync bundles/$VERSION/ubuntu/apt/ s3://$BUCKET/ubuntu/ + cat < Date: Tue, 6 Aug 2013 21:16:51 -0700 Subject: [PATCH 06/27] Update release checklist. Still needs work. Upstream-commit: 13201775dedcb4a544bba32e5d8366eb561093d7 Component: engine --- components/engine/hack/RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/hack/RELEASE.md b/components/engine/hack/RELEASE.md index 5cf407745a..0abcf150df 100644 --- a/components/engine/hack/RELEASE.md +++ b/components/engine/hack/RELEASE.md @@ -50,7 +50,7 @@ up-to-date. - Remote API: fix a bug in the optional unix socket transport ``` -### 3. Change VERSION in commands.go +### 3. Change the contents of the VERSION file ### 4. Run all tests From 611ecad7e3d7ce7b14274412b684094553dcb4da Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Fri, 9 Aug 2013 16:08:11 -0700 Subject: [PATCH 07/27] Upgrade Dockerfile with new dependency Upstream-commit: bdbac9f7a1dd31bd5d78f50eb9fa3b3793d1d13b Component: engine --- components/engine/Dockerfile | 3 ++- components/engine/VERSION | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 1905f056a8..34e23b14df 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -7,6 +7,7 @@ run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt run apt-get update run apt-get install -y -q curl run apt-get install -y -q git +run apt-get install -y -q mercurial # Install Go run curl -s https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz | tar -v -C /usr/local -xz env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin @@ -28,7 +29,7 @@ run PKG=github.com/gorilla/mux/ REV=9b36453141c; git clone http://$PKG /go/src/ run PKG=github.com/dotcloud/tar/ REV=d06045a6d9; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV # Docker requires code.google.com/p/go.net/websocket run apt-get install -y -q mercurial -run PKG=code.google.com/p/go.net REV=78ad7f42aa2e; hg clone https://$PKG /go/src/$PKG && cd /go/src/$PKG && hg checkout -r $REV +run PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && hg checkout $REV # Upload docker source add . /go/src/github.com/dotcloud/docker # Build the binary diff --git a/components/engine/VERSION b/components/engine/VERSION index 53978e5317..12805ec824 100644 --- a/components/engine/VERSION +++ b/components/engine/VERSION @@ -1 +1 @@ -0.5.1-dev +0.5.2-dev From 7a66148c264c9f6bfe08ca9bd5a465d5ae0195cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Aug 2013 16:47:07 -0700 Subject: [PATCH 08/27] add "|| true" otherwise "set -e" kills us if the repo is clean Upstream-commit: d750060f0c39db4b88f14aa413fc1f81706a4373 Component: engine --- components/engine/make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index 8365b7bc2a..9a6986bb07 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -13,7 +13,7 @@ set -x VERSION=`cat ./VERSION` GIT_COMMIT=$(git rev-parse --short HEAD) -GIT_CHANGES=$(test -n "`git status --porcelain`" && echo "+CHANGES") +GIT_CHANGES=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) # "bundles" indicate the different types of build artifacts: static binary, ubuntu package, etc. From 99b30cf7856282478527d4021d908c8ea4f8b148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Aug 2013 17:38:48 -0700 Subject: [PATCH 09/27] =?UTF-8?q?Cosmetic=20changes:=20rewrapping,=20``=20?= =?UTF-8?q?=E2=86=92=20$()=E2=80=A6=20before=20starting=20the=20real=20wor?= =?UTF-8?q?k=20Upstream-commit:=20d9f769930be1c361ac69f9d8479774f37bb39d8c?= =?UTF-8?q?=20Component:=20engine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/engine/make.sh | 50 ++++++++++++++++++++++++------------ components/engine/release.sh | 13 +++++----- 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index 9a6986bb07..411271895b 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -1,41 +1,54 @@ #!/bin/sh -# This script builds various binary artifacts from a checkout of the docker source code. +# This script builds various binary artifacts from a checkout of the docker +# source code. # # Requirements: -# - The current directory should be a checkout of the docker source code (http://github.com/dotcloud/docker). Whatever version is checked out will be built. -# - The script is intented to be run as part of a docker build, as defined in the Dockerfile at the root of the source. -# - If you don't call this script from the official Dockerfile, or a container built by the official Dockerfile, you're probably doing it wrong. +# - The current directory should be a checkout of the docker source code +# (http://github.com/dotcloud/docker). Whatever version is checked out +# will be built. +# - The VERSION file, at the root of the repository, should exist, and +# will be used as Docker binary version and package version. +# - The hash of the git commit will also be included in the Docker binary, +# with the suffix +CHANGES if the repository isn't clean. +# - The script is intented to be run as part of a docker build, as defined +# in the Dockerfile at the root of the source. In other words: +# DO NOT CALL THIS SCRIPT DIRECTLY. +# - The right way to call this script is to invoke "docker build ." from +# your checkout of the Docker repository. # set -e set -x -VERSION=`cat ./VERSION` +VERSION=$(cat ./VERSION) GIT_COMMIT=$(git rev-parse --short HEAD) -GIT_CHANGES=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) +GIT_CHANGES=$(test -n "$(git status --porcelain)" && echo "+CHANGES" || true) -# "bundles" indicate the different types of build artifacts: static binary, ubuntu package, etc. +# Each "bundle" is a different type of build artefact: static binary, Ubuntu +# package, etc. -# Build docker as a static binary file +# Build Docker as a static binary file bundle_binary() { mkdir -p bundles/$VERSION/binary - go build -o bundles/$VERSION/binary/docker-$VERSION -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" ./docker + go build -o bundles/$VERSION/binary/docker-$VERSION \ + -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" \ + ./docker } -# Build docker's test suite as a collection of binary files (one per sub-package to test) +# Build Docker's test suite as a collection of binary files (one per +# sub-package to test) bundle_test() { mkdir -p bundles/$VERSION/test - for test_dir in `find_test_dirs`; do - test_binary=` + for test_dir in $(find_test_dirs); do + test_binary=$( cd $test_dir go test -c -v -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" >&2 find . -maxdepth 1 -type f -name '*.test' -executable - ` + ) cp $test_dir/$test_binary bundles/$VERSION/test/ done - } # Build docker as an ubuntu package using FPM and REPREPRO (sue me). @@ -84,10 +97,13 @@ EOF } -# This helper function walks the current directory looking for directories holding Go test files, -# and prints their paths on standard output, one per line. +# This helper function walks the current directory looking for directories +# holding Go test files, and prints their paths on standard output, one per +# line. find_test_dirs() { - find . -name '*_test.go' | { while read f; do dirname $f; done; } | sort -u + find . -name '*_test.go' | + { while read f; do dirname $f; done; } | + sort -u } diff --git a/components/engine/release.sh b/components/engine/release.sh index e9acc2a1e1..58e6dd3ceb 100755 --- a/components/engine/release.sh +++ b/components/engine/release.sh @@ -1,12 +1,13 @@ #!/bin/sh -# This script looks for bundles built by make.sh, and releases them on a public S3 bucket. +# This script looks for bundles built by make.sh, and releases them on a +# public S3 bucket. # # Bundles should be available for the VERSION string passed as argument. # -# The correct way to call this script is inside a container built by the official Dockerfile -# at the root of the docker source code. The Dockerfile, make.sh and release.sh should all -# be from the same source code revision. +# The correct way to call this script is inside a container built by the +# official Dockerfile at the root of the Docker source code. The Dockerfile, +# make.sh and release.sh should all be from the same source code revision. set -x set -e @@ -48,9 +49,9 @@ release_ubuntu() { s3cmd --acl-public --verbose --delete-removed --follow-symlinks sync bundles/$VERSION/ubuntu/apt/ s3://$BUCKET/ubuntu/ cat < Date: Fri, 9 Aug 2013 17:43:02 -0700 Subject: [PATCH 10/27] Add a check to make sure that make.sh only runs within a container. Upstream-commit: 749a7d0e4f9da13f238062ae0417e68128c589fd Component: engine --- components/engine/make.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/engine/make.sh b/components/engine/make.sh index 411271895b..63bb31bdb5 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -21,6 +21,16 @@ set -e set -x +# We're a nice, sexy, little shell script, and people might try to run us; +# but really, they shouldn't. We want to be in a container! +RESOLVCONF=$(readlink --canonicalize /etc/resolv.conf) +grep -q "$RESOLVCONF" /proc/mounts || { + echo "# I will only run within a container." + echo "# Try this instead:" + echo "docker build ." + exit 1 +} + VERSION=$(cat ./VERSION) GIT_COMMIT=$(git rev-parse --short HEAD) GIT_CHANGES=$(test -n "$(git status --porcelain)" && echo "+CHANGES" || true) From 31b53c5f9ba13f47ce886741ecdb87ce1890a51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Aug 2013 18:08:06 -0700 Subject: [PATCH 11/27] Protect the release.sh script against accidental use. Infer VERSION automatically. Upstream-commit: ff30eb96b67a0ab078553a769456bf6669a29214 Component: engine --- components/engine/Dockerfile | 2 +- components/engine/release.sh | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 34e23b14df..1c07b9024c 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -21,7 +21,7 @@ run apt-get install -y -q reprepro # Install s3cmd 1.0.1 (earlier versions don't support env variables in the config) run apt-get install -y -q python-pip run pip install s3cmd -run /bin/echo -e '[default]\naccess_key=$AWS_ID\nsecret_key=$AWS_KEY\n' > /.s3cfg +run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg # Download dependencies run PKG=github.com/kr/pty REV=27435c699; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV run PKG=github.com/gorilla/context/ REV=708054d61e5; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV diff --git a/components/engine/release.sh b/components/engine/release.sh index 58e6dd3ceb..4d589e3126 100755 --- a/components/engine/release.sh +++ b/components/engine/release.sh @@ -14,15 +14,33 @@ set -e # Print a usage message and exit. usage() { - echo "Usage: $0 VERSION BUCKET" - echo "For example: $0 0.5.1-dev sandbox.get.docker.io" + cat < Date: Fri, 9 Aug 2013 18:10:04 -0700 Subject: [PATCH 12/27] Running the build image will now execute release.sh automatically. Upstream-commit: fbd5b20c388f189ffd59da78951bfc0c623de856 Component: engine --- components/engine/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 1c07b9024c..b5ff537bce 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -34,3 +34,4 @@ run PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG /go/s add . /go/src/github.com/dotcloud/docker # Build the binary run cd /go/src/github.com/dotcloud/docker && ./make.sh +cmd cd /go/src/github.com/dotcloud/docker && ./release.sh From 3d82ce2445fcf03128409b95eb91ffb8cd30c5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Aug 2013 18:18:33 -0700 Subject: [PATCH 13/27] Add a check for S3 bucket access. Upstream-commit: ab4fb9bbfaabccc99e30dd104352dd110f3fd6bd Component: engine --- components/engine/release.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/engine/release.sh b/components/engine/release.sh index 4d589e3126..f029435296 100755 --- a/components/engine/release.sh +++ b/components/engine/release.sh @@ -40,11 +40,16 @@ EOF cd /go/src/github.com/dotcloud/docker/ VERSION=$(cat VERSION) -BUCKET=s3://$AWS_S3_BUCKET +BUCKET=$AWS_S3_BUCKET setup_s3() { # Try creating the bucket. Ignore errors (it might already exist). s3cmd --acl-public mb $BUCKET 2>/dev/null || true + # Check access to the bucket. + # s3cmd has no useful exit status, so we cannot check that. + # Instead, we check if it outputs anything on standard output. + # (When there are problems, it uses standard error instead.) + s3cmd info s3://$BUCKET | grep -q . } # write_to_s3 uploads the contents of standard input to the specified S3 url. From 8ae78ad8ab4a9f2f38ef9b38e9e219cb180377db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Aug 2013 18:23:48 -0700 Subject: [PATCH 14/27] Polish instructions a little bit. Upstream-commit: bfee2c726e75181df3250248a45f89d3c2b0a812 Component: engine --- components/engine/make.sh | 11 +++++++++++ components/engine/release.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index 63bb31bdb5..fd354efe1e 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -121,6 +121,17 @@ main() { bundle_binary bundle_ubuntu #bundle_test + cat < Date: Mon, 12 Aug 2013 20:16:08 -0700 Subject: [PATCH 15/27] Install python-magic (it helps s3cmd) and a convenience /src symlink Upstream-commit: 9694fb85d791376dc05849f607883f50a6c79f7d Component: engine --- components/engine/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index b5ff537bce..22a5896ca6 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -21,6 +21,7 @@ run apt-get install -y -q reprepro # Install s3cmd 1.0.1 (earlier versions don't support env variables in the config) run apt-get install -y -q python-pip run pip install s3cmd +run pip install python-magic run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg # Download dependencies run PKG=github.com/kr/pty REV=27435c699; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV @@ -32,6 +33,7 @@ run apt-get install -y -q mercurial run PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && hg checkout $REV # Upload docker source add . /go/src/github.com/dotcloud/docker +run ln -s /go/src/github.com/dotcloud/docker /src # Build the binary run cd /go/src/github.com/dotcloud/docker && ./make.sh cmd cd /go/src/github.com/dotcloud/docker && ./release.sh From 6c3ed6eab3145e369076a214331fa486867579a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Mon, 12 Aug 2013 20:16:55 -0700 Subject: [PATCH 16/27] Run reprepro from release, incrementally (it needs S3 credentials). Add virtual package. Upstream-commit: 5b0eaef60264a8a5461d85272e00c6721a19d868 Component: engine --- components/engine/make.sh | 51 ++++++++++++++++++++++++------------ components/engine/release.sh | 19 ++++++++++++-- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index fd354efe1e..05796b5d14 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -35,6 +35,16 @@ VERSION=$(cat ./VERSION) GIT_COMMIT=$(git rev-parse --short HEAD) GIT_CHANGES=$(test -n "$(git status --porcelain)" && echo "+CHANGES" || true) +PACKAGE_URL="http://www.docker.io/" +PACKAGE_MAINTAINER="docker@dotcloud.com" +PACKAGE_DESCRIPTION="lxc-docker is a Linux container runtime +Docker complements LXC with a high-level API which operates at the process +level. It runs unix processes with strong guarantees of isolation and +repeatability across servers. +Docker is a great building block for automating distributed systems: +large-scale web deployments, database clusters, continuous deployment systems, +private PaaS, service-oriented architectures, etc." + # Each "bundle" is a different type of build artefact: static binary, Ubuntu # package, etc. @@ -66,7 +76,7 @@ bundle_test() { bundle_ubuntu() { mkdir -p bundles/$VERSION/ubuntu - DIR=$(mktemp -d) + DIR=$(pwd)/bundles/$VERSION/ubuntu/build # Generate an upstart config file (ubuntu-specific) mkdir -p $DIR/etc/init @@ -87,23 +97,30 @@ EOF ( cd bundles/$VERSION/ubuntu - fpm -s dir -t deb -n lxc-docker -v $VERSION -a all --prefix / -C $DIR . + fpm -s dir -C $DIR \ + --name lxc-docker-$VERSION --version $VERSION \ + --architecture $(dpkg-architecture -qDEB_HOST_ARCH) \ + --prefix / \ + --depends lxc --depends aufs-tools \ + --description "$PACKAGE_DESCRIPTION" \ + --maintainer "$PACKAGE_MAINTAINER" \ + --conflicts lxc-docker-virtual-package \ + --provides lxc-docker-virtual-package \ + --replaces lxc-docker-virtual-package \ + --url "$PACKAGE_URL" \ + --vendor "$PACKAGE_VENDOR" \ + -t deb . + mkdir empty + fpm -s dir -C empty \ + --name lxc-docker --version $VERSION \ + --architecture all \ + --depends lxc-docker-$VERSION \ + --description "$PACKAGE_DESCRIPTION" \ + --maintainer "$PACKAGE_MAINTAINER" \ + --url "$PACKAGE_URL" \ + --vendor "$PACKAGE_VENDOR" \ + -t deb . ) - rm -fr $DIR - - - # Setup the APT repo - APTDIR=bundles/$VERSION/ubuntu/apt - mkdir -p $APTDIR/conf - cat > $APTDIR/conf/distributions </dev/null || true + s3cmd --acl-public mb s3://$BUCKET 2>/dev/null || true # Check access to the bucket. # s3cmd has no useful exit status, so we cannot check that. # Instead, we check if it outputs anything on standard output. @@ -69,7 +69,22 @@ s3_url() { # 1. A full APT repository is published at $BUCKET/ubuntu/ # 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/info release_ubuntu() { - s3cmd --acl-public --verbose --delete-removed --follow-symlinks sync bundles/$VERSION/ubuntu/apt/ s3://$BUCKET/ubuntu/ + # Setup the APT repo + APTDIR=bundles/$VERSION/ubuntu/apt + mkdir -p $APTDIR/conf $APTDIR/db + s3cmd sync s3://$BUCKET/ubuntu/db/ $APTDIR/db/ || true + cat > $APTDIR/conf/distributions < Date: Tue, 13 Aug 2013 17:25:12 -0700 Subject: [PATCH 17/27] Update to go 1.1.2. Upstream-commit: abfa7a204de9c21ee722a45de51ebae4c004e07e Component: engine --- components/engine/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 22a5896ca6..218a187c39 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -9,7 +9,7 @@ run apt-get install -y -q curl run apt-get install -y -q git run apt-get install -y -q mercurial # Install Go -run curl -s https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz | tar -v -C /usr/local -xz +run curl -s https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz | tar -v -C /usr/local -xz env PATH /usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin env GOPATH /go env CGO_ENABLED 0 From e0cb1690c77a1b7d424d185278c2113b25cd4204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 14 Aug 2013 10:41:23 -0700 Subject: [PATCH 18/27] Repository should also have i386 index, since Ubuntu is multi-arch by default Upstream-commit: 87872006ceda36adc9d1e51e34177f4ba716542f Component: engine --- components/engine/make.sh | 5 +++-- components/engine/release.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index 05796b5d14..572170ed36 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -35,6 +35,7 @@ VERSION=$(cat ./VERSION) GIT_COMMIT=$(git rev-parse --short HEAD) GIT_CHANGES=$(test -n "$(git status --porcelain)" && echo "+CHANGES" || true) +PACKAGE_ARCHITECTURE="$(dpkg-architecture -qDEB_HOST_ARCH)" PACKAGE_URL="http://www.docker.io/" PACKAGE_MAINTAINER="docker@dotcloud.com" PACKAGE_DESCRIPTION="lxc-docker is a Linux container runtime @@ -99,7 +100,7 @@ EOF cd bundles/$VERSION/ubuntu fpm -s dir -C $DIR \ --name lxc-docker-$VERSION --version $VERSION \ - --architecture $(dpkg-architecture -qDEB_HOST_ARCH) \ + --architecture "$PACKAGE_ARCHITECTURE" \ --prefix / \ --depends lxc --depends aufs-tools \ --description "$PACKAGE_DESCRIPTION" \ @@ -113,7 +114,7 @@ EOF mkdir empty fpm -s dir -C empty \ --name lxc-docker --version $VERSION \ - --architecture all \ + --architecture "$PACKAGE_ARCHITECTURE" \ --depends lxc-docker-$VERSION \ --description "$PACKAGE_DESCRIPTION" \ --maintainer "$PACKAGE_MAINTAINER" \ diff --git a/components/engine/release.sh b/components/engine/release.sh index f4ba6fb83e..dacde5d3fe 100755 --- a/components/engine/release.sh +++ b/components/engine/release.sh @@ -76,7 +76,7 @@ release_ubuntu() { cat > $APTDIR/conf/distributions < Date: Wed, 14 Aug 2013 17:02:55 -0700 Subject: [PATCH 19/27] Implement apt-secure repository signing. Upstream-commit: 9c06420b1876a58d2cd6ea38e5c5139ca42061fe Component: engine --- components/engine/Dockerfile | 2 +- components/engine/make.sh | 3 +++ components/engine/release.sh | 51 ++++++++++++++++++++++++++++++++---- 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 218a187c39..1dcadc45f4 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -17,7 +17,7 @@ run cd /tmp && echo 'package main' > t.go && go test -a -i -v # Ubuntu stuff run apt-get install -y -q ruby1.9.3 rubygems run gem install fpm -run apt-get install -y -q reprepro +run apt-get install -y -q reprepro dpkg-sig # Install s3cmd 1.0.1 (earlier versions don't support env variables in the config) run apt-get install -y -q python-pip run pip install s3cmd diff --git a/components/engine/make.sh b/components/engine/make.sh index 572170ed36..78ea004d00 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -106,7 +106,9 @@ EOF --description "$PACKAGE_DESCRIPTION" \ --maintainer "$PACKAGE_MAINTAINER" \ --conflicts lxc-docker-virtual-package \ + --provides lxc-docker \ --provides lxc-docker-virtual-package \ + --replaces lxc-docker \ --replaces lxc-docker-virtual-package \ --url "$PACKAGE_URL" \ --vendor "$PACKAGE_VENDOR" \ @@ -147,6 +149,7 @@ AWS_ACCESS_KEY, and AWS_SECRET_KEY environment variables: docker run -e AWS_S3_BUCKET=get-staging.docker.io \\ AWS_ACCESS_KEY=AKI1234... \\ AWS_SECRET_KEY=sEs3mE... \\ + GPG_PASSPHRASE=sesame... \\ image_id_or_name ############################################################################### EOF diff --git a/components/engine/release.sh b/components/engine/release.sh index dacde5d3fe..f4047cc172 100755 --- a/components/engine/release.sh +++ b/components/engine/release.sh @@ -22,12 +22,15 @@ To run, I need: AWS_S3_BUCKET; - to be provided with AWS credentials for this S3 bucket, in environment variables AWS_ACCESS_KEY and AWS_SECRET_KEY; +- the passphrase to unlock the GPG key which will sign the deb packages + (passed as environment variable GPG_PASSPHRASE); - a generous amount of good will and nice manners. The canonical way to run me is to run the image produced by the Dockerfile: e.g.:" docker run -e AWS_S3_BUCKET=get-staging.docker.io \\ AWS_ACCESS_KEY=AKI1234... \\ - AWS_SECRET_KEY=sEs3mE... \\ + AWS_SECRET_KEY=sEs4mE... \\ + GPG_PASSPHRASE=m0resEs4mE... \\ f0058411 EOF exit 1 @@ -36,6 +39,7 @@ EOF [ "$AWS_S3_BUCKET" ] || usage [ "$AWS_ACCESS_KEY" ] || usage [ "$AWS_SECRET_KEY" ] || usage +[ "$GPG_PASSPHRASE" ] || usage [ -d /go/src/github.com/dotcloud/docker/ ] || usage cd /go/src/github.com/dotcloud/docker/ @@ -69,6 +73,26 @@ s3_url() { # 1. A full APT repository is published at $BUCKET/ubuntu/ # 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/info release_ubuntu() { + # Make sure that we have our keys + mkdir -p /.gnupg/ + s3cmd sync s3://$BUCKET/ubuntu/.gnupg/ /.gnupg/ || true + gpg --list-keys releasedocker >/dev/null || { + gpg --gen-key --batch < bundles/$VERSION/ubuntu/gpg + s3cmd --acl-public put bundles/$VERSION/ubuntu/gpg s3://$BUCKET/gpg + + # Upload repo + s3cmd --acl-public sync $APTDIR/ s3://$BUCKET/ubuntu/ cat < /etc/apt/sources.list.d/docker.list +# Then import the repository key +curl $(s3_url $BUCKET)/gpg | apt-key add - +# Install docker +apt-get update ; apt-get install lxc-docker EOF echo "APT repository uploaded. Instructions available at $(s3_url $BUCKET)/ubuntu/info" } From 13541356e13ed47fc7a250650489410c32dc7ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 14 Aug 2013 18:01:13 -0700 Subject: [PATCH 20/27] If there are changes, add the timestamp to the package version. Upstream-commit: 5b630d436dc94c26fb551269508f76f110c618bd Component: engine --- components/engine/make.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index 78ea004d00..0e2e63bb0a 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -32,8 +32,13 @@ grep -q "$RESOLVCONF" /proc/mounts || { } VERSION=$(cat ./VERSION) -GIT_COMMIT=$(git rev-parse --short HEAD) -GIT_CHANGES=$(test -n "$(git status --porcelain)" && echo "+CHANGES" || true) +PKGVERSION="$VERSION" +GITCOMMIT=$(git rev-parse --short HEAD) +if test -n "$(git status --porcelain)" +then + GITCOMMIT="$GITCOMMIT+CHANGES" + PKGVERSION="$PKGVERSION-$(date +%Y%m%d%H%M%S)-$GITCOMMIT" +fi PACKAGE_ARCHITECTURE="$(dpkg-architecture -qDEB_HOST_ARCH)" PACKAGE_URL="http://www.docker.io/" @@ -53,7 +58,7 @@ private PaaS, service-oriented architectures, etc." bundle_binary() { mkdir -p bundles/$VERSION/binary go build -o bundles/$VERSION/binary/docker-$VERSION \ - -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" \ + -ldflags "-X main.GITCOMMIT $GITCOMMIT -X main.VERSION $VERSION -d -w" \ ./docker } @@ -65,7 +70,7 @@ bundle_test() { for test_dir in $(find_test_dirs); do test_binary=$( cd $test_dir - go test -c -v -ldflags "-X main.GITCOMMIT $GIT_COMMIT$GIT_CHANGES -X main.VERSION $VERSION -d -w" >&2 + go test -c -v -ldflags "-X main.GITCOMMIT $GITCOMMIT -X main.VERSION $VERSION -d -w" >&2 find . -maxdepth 1 -type f -name '*.test' -executable ) cp $test_dir/$test_binary bundles/$VERSION/test/ @@ -99,7 +104,7 @@ EOF ( cd bundles/$VERSION/ubuntu fpm -s dir -C $DIR \ - --name lxc-docker-$VERSION --version $VERSION \ + --name lxc-docker-$VERSION --version $PKGVERSION \ --architecture "$PACKAGE_ARCHITECTURE" \ --prefix / \ --depends lxc --depends aufs-tools \ @@ -115,7 +120,7 @@ EOF -t deb . mkdir empty fpm -s dir -C empty \ - --name lxc-docker --version $VERSION \ + --name lxc-docker --version $PKGVERSION \ --architecture "$PACKAGE_ARCHITECTURE" \ --depends lxc-docker-$VERSION \ --description "$PACKAGE_DESCRIPTION" \ From 0cd2fece978a979bb9b2b8eeec73c7a2578218d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 14 Aug 2013 18:35:17 -0700 Subject: [PATCH 21/27] Release script also takes care of index file (if the S3 bucket is WS-enabled) Upstream-commit: 0469e47674f01d3f71e979d4597eb81371f124d9 Component: engine --- components/engine/contrib/install.sh | 10 +++++----- components/engine/make.sh | 21 +++++++++++---------- components/engine/release.sh | 17 ++++++++++++++++- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/components/engine/contrib/install.sh b/components/engine/contrib/install.sh index 04340e2acb..3cf7169a07 100755 --- a/components/engine/contrib/install.sh +++ b/components/engine/contrib/install.sh @@ -35,10 +35,10 @@ else fi fi -echo "Downloading docker binary and uncompressing into /usr/local/bin..." -curl -s https://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-latest.tgz | -tar -C /usr/local/bin --strip-components=1 -zxf- \ -docker-latest/docker +echo "Downloading docker binary to /usr/local/bin..." +curl -s https://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-latest \ + > /usr/local/bin/docker +chmod +x /usr/local/bin/docker if [ -f /etc/init/dockerd.conf ] then @@ -50,7 +50,7 @@ description "Docker daemon" start on filesystem or runlevel [2345] stop on runlevel [!2345] respawn -exec env LANG="en_US.UTF-8" /usr/local/bin/docker -d +exec /usr/local/bin/docker -d EOF fi diff --git a/components/engine/make.sh b/components/engine/make.sh index 0e2e63bb0a..06bc2f0203 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -51,6 +51,16 @@ Docker is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc." +UPSTART_SCRIPT='description "Docker daemon" + +start on filesystem or runlevel [2345] +stop on runlevel [!2345] + +respawn + +exec docker -d +' + # Each "bundle" is a different type of build artefact: static binary, Ubuntu # package, etc. @@ -86,16 +96,7 @@ bundle_ubuntu() { # Generate an upstart config file (ubuntu-specific) mkdir -p $DIR/etc/init - cat > $DIR/etc/init/docker.conf < $DIR/etc/init/docker.conf # Copy the binary mkdir -p $DIR/usr/bin diff --git a/components/engine/release.sh b/components/engine/release.sh index f4047cc172..4237070de4 100755 --- a/components/engine/release.sh +++ b/components/engine/release.sh @@ -48,12 +48,14 @@ BUCKET=$AWS_S3_BUCKET setup_s3() { # Try creating the bucket. Ignore errors (it might already exist). - s3cmd --acl-public mb s3://$BUCKET 2>/dev/null || true + s3cmd mb s3://$BUCKET 2>/dev/null || true # Check access to the bucket. # s3cmd has no useful exit status, so we cannot check that. # Instead, we check if it outputs anything on standard output. # (When there are problems, it uses standard error instead.) s3cmd info s3://$BUCKET | grep -q . + # Make the bucket accessible through website endpoints. + s3cmd ws-create --ws-index index --ws-error error s3://$BUCKET } # write_to_s3 uploads the contents of standard input to the specified S3 url. @@ -152,10 +154,23 @@ EOF fi } +# Upload the index script +release_index() { + ( + if [ "$BUCKET" != "get.docker.io" ] + then + sed s,https://get.docker.io/,http://$BUCKET.s3.amazonaws.com/, contrib/install.sh + else + cat contrib/install.sh + fi + ) | write_to_s3 s3://$BUCKET/index +} + main() { setup_s3 release_binary release_ubuntu + release_index } main From b3dfbae57093e92cce64791a004b3ed93bc1b5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 16 Aug 2013 11:59:20 -0700 Subject: [PATCH 22/27] Bump to 0.5.3 (VERSION file) Upstream-commit: c8c69a1499c195cae1669e7cbd4cf96ad19181fc Component: engine --- components/engine/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/VERSION b/components/engine/VERSION index 12805ec824..be14282b7f 100644 --- a/components/engine/VERSION +++ b/components/engine/VERSION @@ -1 +1 @@ -0.5.2-dev +0.5.3 From ba0db20d6d0275d4ff3a1de08a428759ec9567a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 16 Aug 2013 15:30:50 -0700 Subject: [PATCH 23/27] +CHANGES is now -dirty (works better in URLs), and we have postinstall and prerm jobs. Upstream-commit: a8059059c6d6e83cac23fd84e552d4d98ccf3e57 Component: engine --- components/engine/make.sh | 18 ++++++++++++++++-- components/engine/release.sh | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/components/engine/make.sh b/components/engine/make.sh index 06bc2f0203..b4af798354 100755 --- a/components/engine/make.sh +++ b/components/engine/make.sh @@ -10,7 +10,7 @@ # - The VERSION file, at the root of the repository, should exist, and # will be used as Docker binary version and package version. # - The hash of the git commit will also be included in the Docker binary, -# with the suffix +CHANGES if the repository isn't clean. +# with the suffix -dirty if the repository isn't clean. # - The script is intented to be run as part of a docker build, as defined # in the Dockerfile at the root of the source. In other words: # DO NOT CALL THIS SCRIPT DIRECTLY. @@ -36,7 +36,7 @@ PKGVERSION="$VERSION" GITCOMMIT=$(git rev-parse --short HEAD) if test -n "$(git status --porcelain)" then - GITCOMMIT="$GITCOMMIT+CHANGES" + GITCOMMIT="$GITCOMMIT-dirty" PKGVERSION="$PKGVERSION-$(date +%Y%m%d%H%M%S)-$GITCOMMIT" fi @@ -102,10 +102,24 @@ bundle_ubuntu() { mkdir -p $DIR/usr/bin cp bundles/$VERSION/binary/docker-$VERSION $DIR/usr/bin/docker + # Generate postinstall/prerm scripts + cat >/tmp/postinstall </tmp/prerm < /etc/apt/sources.list.d/docker.l # Then import the repository key curl $(s3_url $BUCKET)/gpg | apt-key add - # Install docker -apt-get update ; apt-get install lxc-docker +apt-get update ; apt-get install -y lxc-docker EOF echo "APT repository uploaded. Instructions available at $(s3_url $BUCKET)/ubuntu/info" } From 8da97a2aaaafa98b2d6735e40e658df66b0224d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 16 Aug 2013 16:05:16 -0700 Subject: [PATCH 24/27] Moved release scripts to hack/release and updated instructions. Upstream-commit: b5a48eaed34b81253334575fccf5cb6f1b01fc61 Component: engine --- components/engine/Dockerfile | 4 +- components/engine/hack/RELEASE.md | 133 ------------------ components/engine/hack/release/README.md | 106 ++++++++++++++ components/engine/{ => hack/release}/make.sh | 0 .../engine/{ => hack/release}/release.sh | 0 5 files changed, 108 insertions(+), 135 deletions(-) delete mode 100644 components/engine/hack/RELEASE.md create mode 100644 components/engine/hack/release/README.md rename components/engine/{ => hack/release}/make.sh (100%) rename components/engine/{ => hack/release}/release.sh (100%) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 1dcadc45f4..08019070b3 100644 --- a/components/engine/Dockerfile +++ b/components/engine/Dockerfile @@ -35,5 +35,5 @@ run PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG /go/s add . /go/src/github.com/dotcloud/docker run ln -s /go/src/github.com/dotcloud/docker /src # Build the binary -run cd /go/src/github.com/dotcloud/docker && ./make.sh -cmd cd /go/src/github.com/dotcloud/docker && ./release.sh +run cd /go/src/github.com/dotcloud/docker && hack/release/make.sh +cmd cd /go/src/github.com/dotcloud/docker && hack/release/release.sh diff --git a/components/engine/hack/RELEASE.md b/components/engine/hack/RELEASE.md deleted file mode 100644 index 0abcf150df..0000000000 --- a/components/engine/hack/RELEASE.md +++ /dev/null @@ -1,133 +0,0 @@ -## A maintainer's guide to releasing Docker - -So you're in charge of a docker release? Cool. Here's what to do. - -If your experience deviates from this document, please document the changes to keep it -up-to-date. - - -### 1. Pull from master and create a release branch - - ```bash - $ git checkout master - $ git pull - $ git checkout -b bump_$VERSION - ``` - -### 2. Update CHANGELOG.md - - You can run this command for reference: - - ```bash - LAST_VERSION=$(git tag | grep -E "v[0-9\.]+$" | sort -nr | head -n 1) - git log $LAST_VERSION..HEAD - ``` - - Each change should be formatted as ```BULLET CATEGORY: DESCRIPTION``` - - * BULLET is either ```-```, ```+``` or ```*```, to indicate a bugfix, - new feature or upgrade, respectively. - - * CATEGORY should describe which part of the project is affected. - Valid categories are: - * Builder - * Documentation - * Hack - * Packaging - * Remote API - * Runtime - - * DESCRIPTION: a concise description of the change that is relevant to the end-user, - using the present tense. - Changes should be described in terms of how they affect the user, for example "new feature - X which allows Y", "fixed bug which caused X", "increased performance of Y". - - EXAMPLES: - - ``` - + Builder: 'docker build -t FOO' applies the tag FOO to the newly built container. - * Runtime: improve detection of kernel version - - Remote API: fix a bug in the optional unix socket transport - ``` - -### 3. Change the contents of the VERSION file - -### 4. Run all tests - - ```bash - $ make test - ``` - -### 5. Commit and create a pull request - - ```bash - $ git add commands.go CHANGELOG.md - $ git commit -m "Bump version to $VERSION" - $ git push origin bump_$VERSION - ``` - -### 6. Get 2 other maintainers to validate the pull request - -### 7. Merge the pull request and apply tags - - ```bash - $ git checkout master - $ git merge bump_$VERSION - $ git tag -a v$VERSION # Don't forget the v! - $ git tag -f -a latest - $ git push - $ git push --tags - ``` - -### 8. Publish binaries - - To run this you will need access to the release credentials. - Get them from [the infrastructure maintainers](https://github.com/dotcloud/docker/blob/master/hack/infrastructure/MAINTAINERS). - - ```bash - $ RELEASE_IMAGE=image_provided_by_infrastructure_maintainers - $ BUILD=$(docker run -d -e RELEASE_PPA=0 $RELEASE_IMAGE) - ``` - - This will do 2 things: - - * It will build and upload the binaries on http://get.docker.io - * It will *test* the release on our Ubuntu PPA (a PPA is a community repository for ubuntu packages) - - Wait for the build to complete. - - ```bash - $ docker wait $BUILD # This should print 0. If it doesn't, your build failed. - ``` - - Check that the output looks OK. Here's an example of a correct output: - - ```bash - $ docker logs 2>&1 b4e7c8299d73 | grep -e 'Public URL' -e 'Successfully uploaded' - Public URL of the object is: http://get.docker.io.s3.amazonaws.com/builds/Linux/x86_64/docker-v0.4.7.tgz - Public URL of the object is: http://get.docker.io.s3.amazonaws.com/builds/Linux/x86_64/docker-latest.tgz - Successfully uploaded packages. - ``` - - If you don't see 3 lines similar to this, something might be wrong. Check the full logs and try again. - - -### 9. Publish Ubuntu packages - - If everything went well in the previous step, you can finalize the release by submitting the Ubuntu - packages. - - ```bash - $ RELEASE_IMAGE=image_provided_by_infrastructure_maintainers - $ docker run -e RELEASE_PPA=1 $RELEASE_IMAGE - ``` - - If that goes well, Ubuntu Precise package is in its way. It will take anywhere from 0.5 to 30 hours - for the builders to complete their job depending on builder demand at this time. At this point, Quantal - and Raring packages need to be created using the Launchpad interface: - https://launchpad.net/~dotcloud/+archive/lxc-docker/+packages - - Notify [the packager maintainers](https://github.com/dotcloud/docker/blob/master/packaging/MAINTAINERS) - who will ensure PPA is ready. - - Congratulations! You're done diff --git a/components/engine/hack/release/README.md b/components/engine/hack/release/README.md new file mode 100644 index 0000000000..f01bb3a60b --- /dev/null +++ b/components/engine/hack/release/README.md @@ -0,0 +1,106 @@ +## A maintainer's guide to releasing Docker + +So you're in charge of a Docker release? Cool. Here's what to do. + +If your experience deviates from this document, please document the changes +to keep it up-to-date. + + +### 1. Pull from master and create a release branch + +```bash +git checkout master +git pull +git checkout -b bump_$VERSION +``` + +### 2. Update CHANGELOG.md + +You can run this command for reference: + +```bash +LAST_VERSION=$(git tag | grep -E "v[0-9\.]+$" | sort -nr | head -n 1) +git log $LAST_VERSION..HEAD +``` + +Each change should be formatted as ```BULLET CATEGORY: DESCRIPTION``` + +* BULLET is either ```-```, ```+``` or ```*```, to indicate a bugfix, + new feature or upgrade, respectively. + +* CATEGORY should describe which part of the project is affected. + Valid categories are: + * Builder + * Documentation + * Hack + * Packaging + * Remote API + * Runtime + +* DESCRIPTION: a concise description of the change that is relevant to the + end-user, using the present tense. Changes should be described in terms + of how they affect the user, for example "new feature X which allows Y", + "fixed bug which caused X", "increased performance of Y". + +EXAMPLES: + +``` ++ Builder: 'docker build -t FOO' applies the tag FOO to the newly built + container. +* Runtime: improve detection of kernel version +- Remote API: fix a bug in the optional unix socket transport +``` + +### 3. Change the contents of the VERSION file + +### 4. Run all tests + +```bash +go test +``` + +### 5. Commit and create a pull request + +```bash +git add CHANGELOG.md +git commit -m "Bump version to $VERSION" +git push origin bump_$VERSION +``` + +### 6. Get 2 other maintainers to validate the pull request + +### 7. Merge the pull request and apply tags + +```bash +git checkout master +git merge bump_$VERSION +git tag -a v$VERSION # Don't forget the v! +git tag -f -a latest +git push +git push --tags +``` + +### 8. Publish binaries + +To run this you will need access to the release credentials. +Get them from [the infrastructure maintainers]( +https://github.com/dotcloud/docker/blob/master/hack/infrastructure/MAINTAINERS). + +```bash +docker build -t releasedocker . +docker run \ + -e AWS_S3_BUCKET=get-nightly.docker.io \ + -e AWS_ACCESS_KEY=$(cat ~/.aws/access_key) \ + -e AWS_SECRET_KEY=$(cat ~/.aws/secret_key) \ + -e GPG_PASSPHRASE=supersecretsesame \ + releasedocker +``` + +It will build and upload the binaries on the specified bucket (you should +use get-nightly.docker.io for general testing, and once everything is fine, +switch to get.docker.io). + + +### 9. Rejoice! + +Congratulations! You're done. diff --git a/components/engine/make.sh b/components/engine/hack/release/make.sh similarity index 100% rename from components/engine/make.sh rename to components/engine/hack/release/make.sh diff --git a/components/engine/release.sh b/components/engine/hack/release/release.sh similarity index 100% rename from components/engine/release.sh rename to components/engine/hack/release/release.sh From 76af4da97d8c18cbb28d0dac0c4ef92e85848ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 16 Aug 2013 16:10:12 -0700 Subject: [PATCH 25/27] Update packaging/README to point to hack/release Upstream-commit: e06372d6f434ae64f3cbafddee5491d1e2570584 Component: engine --- components/engine/packaging/README.md | 12 ++++++++++++ components/engine/packaging/README.rst | 8 -------- 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 components/engine/packaging/README.md delete mode 100644 components/engine/packaging/README.rst diff --git a/components/engine/packaging/README.md b/components/engine/packaging/README.md new file mode 100644 index 0000000000..1efe79ab90 --- /dev/null +++ b/components/engine/packaging/README.md @@ -0,0 +1,12 @@ +# Docker packaging + +This directory has one subdirectory per packaging distribution. +At minimum, each of these subdirectories should contain a +README.$DISTRIBUTION explaining how to create the native +docker package and how to install it. + +**Important:** the debian and ubuntu directories are here for +reference only. Since we experienced many issues with Launchpad, +we gave up on using it to have a Docker PPA (at least, for now!) +and we are using a simpler process. +See [/hack/release](../hack/release) for details. diff --git a/components/engine/packaging/README.rst b/components/engine/packaging/README.rst deleted file mode 100644 index 7e927ccffe..0000000000 --- a/components/engine/packaging/README.rst +++ /dev/null @@ -1,8 +0,0 @@ -Docker packaging -================ - -This directory has one subdirectory per packaging distribution. -At minimum, each of these subdirectories should contain a -README.$DISTRIBUTION explaining how to create the native -docker package and how to install it. - From cae3da65a291124d9d552e5cbca68f20047b7a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 20 Aug 2013 19:36:42 -0700 Subject: [PATCH 26/27] Bump up VERSION file to 0.5.3-dev Upstream-commit: 885afebe07c79f54df9c1c4a8c71fcb323f3c944 Component: engine --- components/engine/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/VERSION b/components/engine/VERSION index be14282b7f..aaa0831b0d 100644 --- a/components/engine/VERSION +++ b/components/engine/VERSION @@ -1 +1 @@ -0.5.3 +0.5.3-dev From e0db16a6525db112ef306077842da4a5b653971f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 20 Aug 2013 20:49:16 -0700 Subject: [PATCH 27/27] =?UTF-8?q?Remove=20-x=20flag=20=E2=80=94=20we=20do?= =?UTF-8?q?=20not=20want=20to=20be=20*that*=20verbose.=20Upstream-commit:?= =?UTF-8?q?=208a7c0495e0251c9b74db2c74d09397fb158ed512=20Component:=20engi?= =?UTF-8?q?ne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/engine/hack/release/make.sh | 1 - components/engine/hack/release/release.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/components/engine/hack/release/make.sh b/components/engine/hack/release/make.sh index b4af798354..a9395832bf 100755 --- a/components/engine/hack/release/make.sh +++ b/components/engine/hack/release/make.sh @@ -19,7 +19,6 @@ # set -e -set -x # We're a nice, sexy, little shell script, and people might try to run us; # but really, they shouldn't. We want to be in a container! diff --git a/components/engine/hack/release/release.sh b/components/engine/hack/release/release.sh index 0ce9ab3596..4d5bd00b22 100755 --- a/components/engine/hack/release/release.sh +++ b/components/engine/hack/release/release.sh @@ -9,7 +9,6 @@ # official Dockerfile at the root of the Docker source code. The Dockerfile, # make.sh and release.sh should all be from the same source code revision. -set -x set -e # Print a usage message and exit.