forked from kubicorn/kubicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 933 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
############################################################
# Dockerfile to build kubicorn container images
# Based on golang tip
############################################################
FROM golang:latest
# Create the default data directory
RUN go get github.com/kris-nova/kubicorn/...
WORKDIR /go/src/github.com/kris-nova/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 <kris@nivenly.com>
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/kris-nova/kubicorn .
RUN echo "Image build complete."
CMD [ "./kubicorn" ]