-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
61 lines (37 loc) · 1.37 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM golang:1.9.2 as builder
WORKDIR /go/src/github.com/radu-matei/kube-toolkit
COPY . .
RUN ["chmod", "+x", "prerequisites.sh"]
RUN ./prerequisites.sh
RUN make server-linux
# starting from ubuntu right now, there's an issue starting from alpine/scratch
FROM ubuntu
COPY --from=builder /go/src/github.com/radu-matei/kube-toolkit/bin /app
WORKDIR /app
EXPOSE 10000
ENTRYPOINT ["./ktkd-linux"]
CMD ["start", "--debug"]
####
# original version of Dockerfile, before addinng prerequisites.sh
# here for future reference
####
# FROM golang:1.9.2 as builder
# WORKDIR /go/src/github.com/radu-matei/kube-toolkit
# COPY . .
# RUN apt-get update
# RUN apt-get install -y unzip
# RUN cd /home && \
# wget https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip && \
# unzip protoc-3.5.1-linux-x86_64.zip && \
# export PATH=$PATH:/home/bin
# RUN go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway && \
# go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger && \
# go get -u github.com/golang/protobuf/protoc-gen-go
# RUN make server-linux
# # starting from ubuntu right now, there's an issue starting from alpine/scratch
# FROM ubuntu
# COPY --from=builder /go/src/github.com/radu-matei/kube-toolkit/bin /app
# WORKDIR /app
# EXPOSE 10000
# ENTRYPOINT ["./ktkd-linux"]
# CMD ["start", "--debug"]