From 04feed94574a0bb826f245a682a11bea18edc757 Mon Sep 17 00:00:00 2001 From: Daniel Mican Date: Sat, 7 Dec 2019 16:03:27 -0500 Subject: [PATCH] Dockerfile --- Dockerfile | 8 +++++--- Makefile | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68fa35d..ec783e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.12 +FROM golang:1.13 as builder WORKDIR /go/src/github.com/ImpactInsights/valuestream COPY . . @@ -6,10 +6,12 @@ COPY . . RUN GO111MODULE=on go get -d -v ./... RUN GO111MODULE=on go install -v ./... -EXPOSE 5000 +FROM ubuntu + +COPY --from=builder /go/bin/valuestream /usr/local/bin RUN useradd -m vs USER vs -CMD valuestream -addr=":"$PORT +CMD valuestream diff --git a/Makefile b/Makefile index 38a33d5..a692d1b 100644 --- a/Makefile +++ b/Makefile @@ -53,4 +53,7 @@ test-service-events: -tags=service \ ./eventsources/... -count=1 -p 1 +docker-image: + docker build -f Dockerfile -t valuestream . + .PHONY: test-unit start-stack fmt