forked from kubicorn/kubicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (26 loc) · 1009 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
############################################################
# Dockerfile to build kubicorn container images
# Based on golang tip
############################################################
FROM golang:latest
RUN git config --global url."https://github.com/".insteadOf "[email protected]:"
# Create the default data directory
RUN go get github.com/kubicorn/kubicorn/...
WORKDIR /go/src/github.com/kubicorn/kubicorn/
# Runs appropriate make command based on environment
RUN CGO_ENABLED=0 GOOS=linux make docker-build-linux-amd64
#RUN GOOS=darwin make build-darwin-amd64
#RUN GOOS=windows make build-windows-amd64
#RUN GOOS=freebsd make build-freebsd-amd64
# Multi-stage build docker image
FROM alpine:latest
# File Author / Maintainer
MAINTAINER Kris Nova <[email protected]>
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
RUN apk add --no-cache \
ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/kubicorn/kubicorn .
RUN echo "Image build complete."
CMD [ "./kubicorn" ]