From 4440ac73492a7c5538fddff12be6385bd496a24c Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Sat, 22 Jul 2017 02:54:54 +0100 Subject: [PATCH] Add Dockerfile. Update Makefile. --- Dockerfile | 7 +++++++ Makefile | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e69de29bb..a94c6a9e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.6 + +RUN apk add --no-cache ca-certificates + +ADD _build/cert-manager-linux-amd64 /usr/bin/cert-manager + +CMD ["/usr/bin/cert-manager"] diff --git a/Makefile b/Makefile index 20064059c..fad392099 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ ACCOUNT=jetstack APP_NAME=cert-manager +REGISTRY=quay.io PACKAGE_NAME=github.com/${ACCOUNT}/${APP_NAME} GO_VERSION=1.8 @@ -7,7 +8,7 @@ GO_VERSION=1.8 GOOS := linux GOARCH := amd64 -DOCKER_IMAGE=${ACCOUNT}/${APP_NAME} +DOCKER_IMAGE=${REGISTRY}/${ACCOUNT}/${APP_NAME} BUILD_DIR=_build TEST_DIR=_test @@ -25,7 +26,7 @@ TYPES_FILES = $(shell find pkg/apis -name types.go) .PHONY: version -all: test build +all: verify test build .get_deps: @echo "Grabbing dependencies..." @@ -80,7 +81,7 @@ docker_%: # remove container docker rm $(CONTAINER_ID) -image: docker_all version +image: version docker build --build-arg VCS_REF=$(GIT_COMMIT) -t $(DOCKER_IMAGE):$(BUILD_TAG) . push: image