From 3955af35613b33ed011a1978e597f6c3198bedb3 Mon Sep 17 00:00:00 2001 From: Brendan Melville Date: Tue, 24 Nov 2015 16:20:49 -0800 Subject: [PATCH] Adding Dockerfile and Makefil to create dm client container. Needs readme and addition to getting started guide for running from container. --- Makefile | 2 +- dm/Dockerfile | 25 +++++++++++++++++++++++++ dm/Makefile | 27 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 dm/Dockerfile create mode 100644 dm/Makefile diff --git a/Makefile b/Makefile index 3a3e50b48..81f93aeb4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SUBDIRS := expandybird/. resourcifier/. manager/. +SUBDIRS := expandybird/. resourcifier/. manager/. dm/. TARGETS := all build test push container clean SUBDIRS_TARGETS := \ diff --git a/dm/Dockerfile b/dm/Dockerfile new file mode 100644 index 000000000..ef00ad98a --- /dev/null +++ b/dm/Dockerfile @@ -0,0 +1,25 @@ +# Copyright 2015 Google, Inc. All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM golang:1.4 +MAINTAINER Jack Greenfield + +RUN mkdir -p "$GOPATH/src/github.com" && chmod 777 "$GOPATH/src/github.com" + +WORKDIR "$GOPATH" + +RUN go-wrapper download github.com/kubernetes/deployment-manager/dm/... +RUN go-wrapper install github.com/kubernetes/deployment-manager/dm/... + +ENTRYPOINT ["bin/dm"] diff --git a/dm/Makefile b/dm/Makefile new file mode 100644 index 000000000..7f2fc5312 --- /dev/null +++ b/dm/Makefile @@ -0,0 +1,27 @@ +# Makefile for the Docker image $(DOCKER_REGISTRY)/$(PROJECT)/dm +# MAINTAINER: Jack Greenfield +# If you update this image please check the tag value before pushing. + +.PHONY : all build test push container clean .project + +DOCKER_REGISTRY := gcr.io +PREFIX := $(DOCKER_REGISTRY)/$(PROJECT) +IMAGE := dm +TAG := latest + +ROOT_DIR := $(abspath ./..) +DIR = $(ROOT_DIR) + +push: container +ifeq ($(DOCKER_REGISTRY),gcr.io) + gcloud docker push $(PREFIX)/$(IMAGE):$(TAG) +else + docker push $(PREFIX)/$(IMAGE):$(TAG) +endif + +container: + docker build -t $(PREFIX)/$(IMAGE):$(TAG) -f Dockerfile $(DIR) + +clean: + -docker rmi $(PREFIX)/$(IMAGE):$(TAG) +