Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
32
components/packaging/deb/README.md
Normal file
32
components/packaging/deb/README.md
Normal file
@ -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
|
||||
```
|
||||
@ -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
|
||||
|
||||
32
components/packaging/rpm/README.md
Normal file
32
components/packaging/rpm/README.md
Normal file
@ -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
|
||||
```
|
||||
@ -203,6 +203,9 @@ fi
|
||||
|
||||
%changelog
|
||||
|
||||
* Wed Jun 21 2017 <eli.uriegas@docker.com> 17.06.0-ce
|
||||
- release docker-ce 17.06.0-ce
|
||||
|
||||
* Mon Jun 19 2017 <eli.uriegas@docker.com> 17.06.0-ce-rc5
|
||||
- release docker-ce 17.06.0-ce-rc5
|
||||
|
||||
|
||||
@ -204,6 +204,9 @@ fi
|
||||
|
||||
%changelog
|
||||
|
||||
* Wed Jun 21 2017 <eli.uriegas@docker.com> 17.06.0-ce
|
||||
- release docker-ce 17.06.0-ce
|
||||
|
||||
* Mon Jun 19 2017 <eli.uriegas@docker.com> 17.06.0-ce-rc5
|
||||
- release docker-ce 17.06.0-ce-rc5
|
||||
|
||||
|
||||
@ -202,6 +202,9 @@ fi
|
||||
|
||||
%changelog
|
||||
|
||||
* Wed Jun 21 2017 <eli.uriegas@docker.com> 17.06.0-ce
|
||||
- release docker-ce 17.06.0-ce
|
||||
|
||||
* Mon Jun 19 2017 <eli.uriegas@docker.com> 17.06.0-ce-rc5
|
||||
- release docker-ce 17.06.0-ce-rc5
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user