-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 766 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 766 Bytes
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
ARG HELM_VERSION=latest
FROM golang:1.9-alpine AS go
RUN apk add --no-cache git
# set kompose version
ARG KOMPOSE_VERSION=v1.5.0
# clone code and buid
RUN mkdir -p /go/src/github.com/kubernetes
RUN git clone --branch ${KOMPOSE_VERSION} -- https://github.com/kubernetes/kompose.git /go/src/github.com/kubernetes/kompose
WORKDIR /go/src/github.com/kubernetes/kompose
RUN CGO_ENABLED=0 go build -o /kompose main.go
# helm and kubectl image
FROM dtzar/helm-kubectl:${HELM_VERSION} as helm
# main image
FROM alpine:3.6
# copy kompose
COPY --from=go /kompose /usr/local/bin/
# copy kubectl and helm
COPY --from=helm /bin/helm /usr/bin/
COPY --from=helm /usr/local/bin/kubectl /usr/bin/
ADD bin/* /opt/bin/
RUN chmod +x /opt/bin/*
CMD ["/opt/bin/release_compose"]