blob: 641f75e83f23fbd46314991753c6e1b0307b8a18 [file] [log] [blame]
Matteo Scandoloa8bd93e2018-09-13 13:36:50 -07001# Copyright 2018-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# docker build -t opencord/kafka-topic-exporter:latest .
16# docker build -t 10.90.0.101:30500/opencord/kafka-topic-exporter:latest .
17
Scott Bakere8537af2018-10-22 14:53:44 -070018FROM golang:1.10-stretch as builder
Ganesh Bhure8bb19822019-06-10 10:56:22 +053019RUN mkdir -p /go/src/gerrit.opencord.org/kafka-topic-exporter
20ADD . /go/src/gerrit.opencord.org/kafka-topic-exporter
21WORKDIR /go/src/gerrit.opencord.org/kafka-topic-exporter
22RUN go get -u github.com/golang/dep/cmd/dep
23RUN dep ensure --vendor-only
Scott Bakere8537af2018-10-22 14:53:44 -070024RUN CGO_ENABLED=0 GOOS=linux go build -o main .
Matteo Scandolo189526a2018-07-13 09:10:23 -070025
Scott Bakere8537af2018-10-22 14:53:44 -070026FROM alpine:3.8
Ganesh Bhure8bb19822019-06-10 10:56:22 +053027WORKDIR /go/src/gerrit.opencord.org/kafka-topic-exporter/
28COPY --from=builder /go/src/gerrit.opencord.org/kafka-topic-exporter/main .
Ganesh Bhure8d0c9942019-05-24 11:42:09 +053029ENTRYPOINT ["./main"]