From 606d5d6622196c4b070a9bc9bfe92fc6cbbcba1c Mon Sep 17 00:00:00 2001 From: nickboldt Date: Fri, 8 Feb 2019 11:35:34 -0500 Subject: [PATCH] merge changes from CRW version of dockerfile so we're a bit more consistent - CRW-87 Change-Id: Ie8f5bfefdbe47ff80d04dfb98d30382b074a0e22 Signed-off-by: nickboldt --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90ffd5779..bc2c0e158 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -# -# Copyright (c) 2012-2018 Red Hat, Inc. +# Copyright (c) 2018-2019 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -8,13 +7,14 @@ # # Contributors: # Red Hat, Inc. - initial API and implementation +# FROM golang:1.10.3 as builder +USER root ADD . /go/src/github.com/eclipse/che-operator -RUN cd /go/src/github.com/eclipse/che-operator && go test -v ./... -RUN OOS=linux GOARCH=amd64 CGO_ENABLED=0 \ - go build -o /tmp/che-operator/che-operator \ - /go/src/github.com/eclipse/che-operator/cmd/che-operator/main.go +RUN cd /go/src/github.com/eclipse/che-operator && go test -v ./... && \ + OOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /tmp/che-operator/che-operator \ + /go/src/github.com/eclipse/che-operator/cmd/che-operator/main.go && cd .. FROM alpine:3.7 COPY --from=builder /tmp/che-operator/che-operator /usr/local/bin/che-operator