Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #119 from andrewhsu/alpine-image
Browse files Browse the repository at this point in the history
[17.06] Add reflective alpine images to other components
  • Loading branch information
andrewhsu authored Jul 14, 2017
2 parents 70709d0 + 06dcd93 commit 4581021
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions components/packaging/deb/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
9 changes: 5 additions & 4 deletions components/packaging/rpm/Makefile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -56,13 +57,13 @@ 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:
mkdir -p rpmbuild/SOURCES
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
5 changes: 3 additions & 2 deletions components/packaging/static/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -41,7 +42,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
$(HASH_CMD) bash hash_files build/win

Expand Down

0 comments on commit 4581021

Please sign in to comment.