diff --git a/components/packaging/deb/Makefile b/components/packaging/deb/Makefile index d0bedb8a67..1b3cf664b7 100644 --- a/components/packaging/deb/Makefile +++ b/components/packaging/deb/Makefile @@ -1,12 +1,12 @@ SHELL:=/bin/bash -ALPINE:=$(shell $(CURDIR)/../detect_alpine_image) +ALPINE_IMG:=$(shell $(CURDIR)/../detect_alpine_image) ARCH:=$(shell uname -m) ENGINE_DIR:=$(CURDIR)/../../engine CLI_DIR:=$(CURDIR)/../../cli GITCOMMIT?=$(shell cd $(ENGINE_DIR) && git rev-parse --short HEAD) VERSION?=$(shell cat $(ENGINE_DIR)/VERSION) DOCKER_EXPERIMENTAL:=0 -CHOWN:=docker run --rm -i -v $(CURDIR):/v -w /v $(ALPINE) chown +CHOWN:=docker run --rm -v $(CURDIR):/v -w /v $(ALPINE_IMG) chown .PHONY: help clean deb ubuntu debian ubuntu-xenial ubuntu-trusty ubuntu-yakkety ubuntu-zesty debian-jessie debian-stretch debian-wheezy diff --git a/components/packaging/deb/README.md b/components/packaging/deb/README.md new file mode 100644 index 0000000000..e5c4ca2b6b --- /dev/null +++ b/components/packaging/deb/README.md @@ -0,0 +1,32 @@ +# Building your own Docker deb package + +`.deb` packages can be built from this directory with the following syntax + +```shell +make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli deb +``` + +Artifacts will be located in `debbuild` under the following directory structure: +`debbuild/$distro-$distro_version/` + +### NOTES: +* `ENGINE_DIR` -> Specifies the directory where the engine code is located, eg: `$GOPATH/src/github.com/docker/docker` +* `CLI_DIR` -> Specifies the directory where the cli code is located, eg: `$GOPATH/src/github.com/docker/cli` + +## Specifying a specific distro + +```shell +make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli ubuntu +``` + +## Specifying a specific distro version +```shell +make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli ubuntu-xenial +``` + +## Building the latest docker-ce + +```shell +git clone https://github.com/docker/docker-ce.git +make ENGINE_DIR=docker-ce/components/engine CLI_DIR=docker-ce/components/cli deb +``` diff --git a/components/packaging/rpm/Makefile b/components/packaging/rpm/Makefile index d5845abac6..960ff38222 100644 --- a/components/packaging/rpm/Makefile +++ b/components/packaging/rpm/Makefile @@ -1,12 +1,13 @@ ARCH=$(shell uname -m) +ALPINE_IMG:=$(shell $(CURDIR)/../detect_alpine_image) ENGINE_DIR:=$(CURDIR)/../../engine CLI_DIR:=$(CURDIR)/../../cli GITCOMMIT=$(shell cd $(ENGINE_DIR) && git rev-parse --short HEAD) VERSION=$(shell cat $(ENGINE_DIR)/VERSION) DOCKER_EXPERIMENTAL=0 GEN_RPM_VER=$(shell ./gen-rpm-ver $(ENGINE_DIR) $(VERSION)) -CHOWN=docker run --rm -i -v $(CURDIR):/v -w /v alpine chown -RPMBUILD=docker run --privileged --rm -i \ +CHOWN=docker run --rm -i -v $(CURDIR):/v -w /v $(ALPINE_IMG) chown +RPMBUILD=docker run --privileged --rm -i\ -v $(CURDIR)/rpmbuild/SOURCES:/root/rpmbuild/SOURCES \ -v $(CURDIR)/rpmbuild/BUILD:/root/rpmbuild/BUILD \ -v $(CURDIR)/rpmbuild/BUILDROOT:/root/rpmbuild/BUILDROOT \ @@ -56,7 +57,7 @@ rpmbuild/SOURCES/cli.tgz: docker run --rm -i -w /v \ -v $(CLI_DIR):/cli \ -v $(CURDIR)/rpmbuild/SOURCES:/v \ - alpine \ + $(ALPINE_IMG) \ tar -C / -c -z -f /v/cli.tgz --exclude .git cli rpmbuild/SOURCES/engine.tgz: @@ -64,5 +65,5 @@ rpmbuild/SOURCES/engine.tgz: docker run --rm -i -w /v \ -v $(ENGINE_DIR):/engine \ -v $(CURDIR)/rpmbuild/SOURCES:/v \ - alpine \ + $(ALPINE_IMG) \ tar -C / -c -z -f /v/engine.tgz --exclude .git engine diff --git a/components/packaging/rpm/README.md b/components/packaging/rpm/README.md new file mode 100644 index 0000000000..cc55aa8343 --- /dev/null +++ b/components/packaging/rpm/README.md @@ -0,0 +1,32 @@ +# Building your own Docker rpm package + +`.rpm` packages can be built from this directory with the following syntax + +```shell +make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli rpm +``` + +Artifacts will be located in `rpmbuild` under the following directory structure: +`rpmbuild/$distro-$distro_version/` + +### NOTES: +* `ENGINE_DIR` -> Specifies the directory where the engine code is located, eg: `$GOPATH/src/github.com/docker/docker` +* `CLI_DIR` -> Specifies the directory where the cli code is located, eg: `$GOPATH/src/github.com/docker/cli` + +## Specifying a specific distro + +```shell +make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli fedora +``` + +## Specifying a specific distro version +```shell +make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli fedora-25 +``` + +## Building the latest docker-ce + +```shell +git clone https://github.com/docker/docker-ce.git +make ENGINE_DIR=docker-ce/components/engine CLI_DIR=docker-ce/components/cli rpm +``` diff --git a/components/packaging/rpm/centos-7/docker-ce.spec b/components/packaging/rpm/centos-7/docker-ce.spec index f6278fa915..82445d3333 100644 --- a/components/packaging/rpm/centos-7/docker-ce.spec +++ b/components/packaging/rpm/centos-7/docker-ce.spec @@ -203,6 +203,9 @@ fi %changelog +* Wed Jun 21 2017 17.06.0-ce +- release docker-ce 17.06.0-ce + * Mon Jun 19 2017 17.06.0-ce-rc5 - release docker-ce 17.06.0-ce-rc5 diff --git a/components/packaging/rpm/fedora-24/docker-ce.spec b/components/packaging/rpm/fedora-24/docker-ce.spec index 841c2b6a04..84108421fc 100644 --- a/components/packaging/rpm/fedora-24/docker-ce.spec +++ b/components/packaging/rpm/fedora-24/docker-ce.spec @@ -204,6 +204,9 @@ fi %changelog +* Wed Jun 21 2017 17.06.0-ce +- release docker-ce 17.06.0-ce + * Mon Jun 19 2017 17.06.0-ce-rc5 - release docker-ce 17.06.0-ce-rc5 diff --git a/components/packaging/rpm/fedora-25/docker-ce.spec b/components/packaging/rpm/fedora-25/docker-ce.spec index 3eaae94b95..09d1cbf465 100644 --- a/components/packaging/rpm/fedora-25/docker-ce.spec +++ b/components/packaging/rpm/fedora-25/docker-ce.spec @@ -202,6 +202,9 @@ fi %changelog +* Wed Jun 21 2017 17.06.0-ce +- release docker-ce 17.06.0-ce + * Mon Jun 19 2017 17.06.0-ce-rc5 - release docker-ce 17.06.0-ce-rc5 diff --git a/components/packaging/static/Makefile b/components/packaging/static/Makefile index 57d51851ea..a6c727682d 100644 --- a/components/packaging/static/Makefile +++ b/components/packaging/static/Makefile @@ -1,9 +1,10 @@ SHELL:=/bin/bash +ALPINE_IMG:=$(shell $(CURDIR)/../detect_alpine_image) ENGINE_DIR:=$(CURDIR)/../../engine CLI_DIR:=$(CURDIR)/../../cli ENGINE_VER=$(shell cat $(ENGINE_DIR)/VERSION) VERSION=$(shell cat $(ENGINE_DIR)/VERSION) -CHOWN=docker run --rm -v $(CURDIR):/v -w /v alpine chown +CHOWN=docker run --rm -v $(CURDIR):/v -w /v $(ALPINE_IMG) chown HASH_CMD=docker run -v $(CURDIR):/sum -w /sum debian:jessie bash hash_files DIR_TO_HASH:=build/linux @@ -13,7 +14,7 @@ help: ## show make targets @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) clean: ## remove build artifacts - $(CHOWN) -R $(shell id -u):$(shell id -g) build + [ ! -d build ] || $(CHOWN) -R $(shell id -u):$(shell id -g) build $(RM) -r build static: static-linux cross-mac cross-win cross-arm ## create all static packages @@ -39,7 +40,7 @@ cross-win: cross-all-cli cross-win-engine ## create zip file with windows x86_64 mkdir -p build/win/docker cp $(CLI_DIR)/build/docker-windows-amd64 build/win/docker/docker.exe cp $(ENGINE_DIR)/bundles/$(ENGINE_VER)/cross/windows/amd64/dockerd-$(ENGINE_VER).exe build/win/docker/dockerd.exe - docker run --rm -v $(CURDIR)/build/win:/v -w /v alpine sh -c 'apk update&&apk add zip&&zip -r docker-$(VERSION).zip docker' + docker run --rm -v $(CURDIR)/build/win:/v -w /v $(ALPINE_IMG) sh -c 'apk update&&apk add zip&&zip -r docker-$(VERSION).zip docker' $(CHOWN) -R $(shell id -u):$(shell id -g) build cross-arm: cross-all-cli ## create tgz with linux armhf client only