-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 882 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
#########################################################
# Build the sources and provide the result in a multi stage
# docker container. The alpine build image has to match
# the alpine image in the referencing runtime container.
#########################################################
FROM golang:1.11.2-alpine3.8 AS builder
RUN apk add \
bash \
gcc \
musl-dev \
openssl
# Directory in workspace
WORKDIR "/go/src/github.com/Peripli"
COPY . ./
RUN pwd
RUN ls -ls
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -v -a -buildmode=plugin -o /service-manager-istio-plugin.so ./service-manager-broker-proxy-istio-plugin
FROM gcr.io/sap-se-gcp-istio-dev/sb-proxy-k8s
WORKDIR /app
COPY --from=builder /service-manager-istio-plugin.so /app/
RUN apk add --no-cache bash gawk sed grep bc coreutils
ENTRYPOINT [ "./main","--plugin","service-manager-istio-plugin.so"]