Skip to content

Commit

Permalink
Add makefile, with docker builds using binary
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Nov 29, 2018
1 parent c79424d commit 2277b8f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
FROM golang:1.10.1-alpine3.7
FROM alpine:3.7

LABEL maintainer="Minio Inc <[email protected]>"

WORKDIR /go/src/github.com/minio/
COPY . /go/src/github.com/minio/minio-operator
COPY minio-operator /usr/bin/

RUN \
apk add --no-cache ca-certificates 'curl>7.61.0' && \
cd /go/src/github.com/minio/minio-operator && \
go install
chmod +x /usr/bin/minio-operator

CMD ["minio-operator"]
CMD ["minio-operator"]
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PWD := $(shell pwd)
TAG ?= "minio/k8s-operator"

all: build

build:
@CGO_ENABLED=0 go build --ldflags "-s -w" -o $(PWD)/minio-operator
@docker build -t $(TAG) .

install: all
@docker push $(TAG)

0 comments on commit 2277b8f

Please sign in to comment.