Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
#Build Stage
FROM golang:1.14.2-alpine as builder
ENV GOPROXY=https://gocenter.io

#Add packages for dependency management
RUN apk add dep
RUN apk add git

#Copy project files and get dependencies
COPY . /go/src/github.com/munnerz/kube-plex
WORKDIR /go/src/github.com/munnerz/kube-plex
RUN set -x && \
go get . && \
dep ensure -v

#Run Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o kube-plex_linux_amd64 /go/src/github.com/munnerz/kube-plex
RUN ls /go/src/github.com/munnerz/kube-plex

#Copy into clean container
FROM alpine:3.6

ADD kube-plex_linux_amd64 /kube-plex
COPY --from=builder /go/src/github.com/munnerz/kube-plex/kube-plex_linux_amd64 /kube-plex