Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ailispaw committed Jul 14, 2017
1 parent 1f17a0e commit e03a56c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker/
docker-ce/

docker-*.tgz
docker-*.hash
60 changes: 36 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
GITHASH := 89658be
VERSION := 17.05.0-ce

ARCHIVE := docker-$(VERSION).tgz
HASH := docker-$(VERSION).hash
BINARIES := docker/bundles/$(VERSION)/binary-client/docker \
docker/bundles/$(VERSION)/binary-daemon/docker-containerd \
docker/bundles/$(VERSION)/binary-daemon/docker-containerd-ctr \
docker/bundles/$(VERSION)/binary-daemon/docker-containerd-shim \
docker/bundles/$(VERSION)/binary-daemon/docker-init \
docker/bundles/$(VERSION)/binary-daemon/docker-proxy \
docker/bundles/$(VERSION)/binary-daemon/docker-runc \
docker/bundles/$(VERSION)/binary-daemon/dockerd
GITHASH := 02c1d87
VERSION := 17.06.0-ce

ARCHIVE := docker-$(VERSION).tgz
HASH := docker-$(VERSION).hash

CLI := docker-ce/components/cli/build/docker
ENGINE := \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/docker-containerd \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/docker-containerd-ctr \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/docker-containerd-shim \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/docker-init \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/docker-proxy \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/docker-runc \
docker-ce/components/engine/bundles/$(VERSION)/binary-daemon/dockerd
BINARIES := $(CLI) $(ENGINE)

all: $(ARCHIVE) $(HASH)

Expand All @@ -19,22 +22,31 @@ $(HASH): $(ARCHIVE)
sha256sum $(ARCHIVE) >> $@

$(ARCHIVE): $(BINARIES)
sudo rm -rf docker/bundles/$(VERSION)/docker
sudo mkdir -p docker/bundles/$(VERSION)/docker
sudo cp $^ docker/bundles/$(VERSION)/docker/
tar zcvf docker-$(VERSION).tgz -C docker/bundles/$(VERSION)/ docker
rm -rf docker-ce/bundles/$(VERSION)/docker
mkdir -p docker-ce/bundles/$(VERSION)/docker
cp $^ docker-ce/bundles/$(VERSION)/docker/
tar zcvf $@ -C docker-ce/bundles/$(VERSION)/ docker

$(BINARIES): | docker
cd docker && git fetch && git checkout $(GITHASH)
$(MAKE) -C docker binary
$(CLI): | docker-cli-builder docker-ce
cd docker-ce && git fetch && git checkout $(GITHASH)
docker run -t --rm -e VERSION=$(VERSION) -e GITCOMMIT=$(GITHASH) \
-v $(CURDIR)/docker-ce/components/cli:/go/src/github.com/docker/cli docker-cli-builder make

docker:
git clone https://github.com/docker/docker.git
$(ENGINE): | docker-ce
cd docker-ce && git fetch && git checkout $(GITHASH)
$(MAKE) -C docker-ce/components/engine binary

docker-cli-builder:
docker build -t docker-cli-builder docker-cli-builder

docker-ce:
git clone https://github.com/docker/docker-ce.git

clean:
$(RM) $(ARCHIVE) $(HASH) $(BINARIES)

distclean: clean
$(RM) -r docker
$(RM) -r docker-ce
docker rmi docker-cli-builder

.PHONY: all clean distclean
.PHONY: all docker-cli-builder clean distclean
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Docker for armhf
# Docker for arm64/aarch64
19 changes: 19 additions & 0 deletions docker-cli-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM arm64v8/ubuntu:xenial

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get -q update && \
apt-get -q -y install --no-install-recommends \
curl ca-certificates build-essential make golang-go && \
apt-get clean && rm -rf /var/lib/apt/lists/*

ENV GO_VERSION 1.7.6
RUN mkdir /usr/src/go && curl -fsSL https://golang.org/dl/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 \
&& cd /usr/src/go/src \
&& GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash

ENV PATH /go/bin:/usr/src/go/bin:$PATH
ENV GOPATH /go

VOLUME /go/src/github.com/docker/cli

WORKDIR /go/src/github.com/docker/cli

0 comments on commit e03a56c

Please sign in to comment.