Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create cloud agent image #2284

Merged
merged 6 commits into from
Feb 27, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor Makefile
  • Loading branch information
Alfonso Acosta committed Feb 27, 2017
commit 0c6c79a91a2da7d5a1482b206ad13b180bddd23d
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")
DOCKERHUB_USER=weaveworks
SCOPE_EXE=prog/scope
SCOPE_IMAGE=$(DOCKERHUB_USER)/scope
CLOUD_AGENT_IMAGE=$(DOCKERHUB_USER)/cloud-agent
SCOPE_EXPORT=scope.tar
CLOUD_AGENT_EXPORT=cloud-agent.tar
SCOPE_UI_BUILD_IMAGE=$(DOCKERHUB_USER)/scope-ui-build
Expand Down Expand Up @@ -48,18 +46,20 @@ docker/weaveutil:
$(SUDO) docker run --rm --entrypoint=cat weaveworks/weaveexec:$(WEAVENET_VERSION) /usr/bin/weaveutil > $@
chmod +x $@

$(CLOUD_AGENT_EXPORT): $(SCOPE_EXE) $(DOCKER_DISTRIB) docker/weave docker/weaveutil docker/Dockerfile.cloud-agent
cp $(SCOPE_EXE) $(RUNSVINIT) docker/
cp $(DOCKER_DISTRIB) docker/docker.tgz
tar -xvzf docker/docker.tgz docker/docker
$(SUDO) docker build -t $(CLOUD_AGENT_IMAGE) -f docker/Dockerfile.cloud-agent docker/
$(SUDO) docker tag $(CLOUD_AGENT_IMAGE) $(CLOUD_AGENT_IMAGE):$(IMAGE_TAG)
$(SUDO) docker save $(CLOUD_AGENT_IMAGE):latest > $@

$(SCOPE_EXPORT): $(CLOUD_AGENT_EXPORT) $(RUNSVINIT) docker/Dockerfile docker/demo.json docker/run-app docker/run-probe docker/entrypoint.sh
$(SUDO) docker build -t $(SCOPE_IMAGE) docker/
$(SUDO) docker tag $(SCOPE_IMAGE) $(SCOPE_IMAGE):$(IMAGE_TAG)
$(SUDO) docker save $(SCOPE_IMAGE):latest > $@
docker/%: %
cp $* docker/

docker/docker: $(DOCKER_DISTRIB)
tar -xvzf $(DOCKER_DISTRIB) docker/docker

%.tar: docker/Dockerfile.%
$(SUDO) docker build -t $(DOCKERHUB_USER)/$* -f $< docker/
$(SUDO) docker tag $(DOCKERHUB_USER)/$* $(DOCKERHUB_USER)/$*:$(IMAGE_TAG)
$(SUDO) docker save $(DOCKERHUB_USER)/$*:latest > $@

$(CLOUD_AGENT_EXPORT): docker/Dockerfile.cloud-agent docker/$(SCOPE_EXE) docker/docker docker/weave docker/weaveutil

$(SCOPE_EXPORT): docker/Dockerfile.scope $(CLOUD_AGENT_EXPORT) docker/$(RUNSVINIT) docker/demo.json docker/run-app docker/run-probe docker/entrypoint.sh

$(RUNSVINIT): vendor/runsvinit/*.go

Expand Down
File renamed without changes.