blob: 3e10cf2f660cf71e751275b2d9f4e23b3dae2d32 [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 .
kartikey dubey72ef3b82019-05-27 06:50:04 +000016# docker build -t 10.128.22.1:30500/opencord/kafka-topic-exporter:latest .
Matteo Scandoloa8bd93e2018-09-13 13:36:50 -070017
kesavandc71914f2022-03-25 11:19:03 +053018FROM golang:1.16 as builder
Ganesh Bhure8bb19822019-06-10 10:56:22 +053019RUN mkdir -p /go/src/gerrit.opencord.org/kafka-topic-exporter
kartikey dubey72ef3b82019-05-27 06:50:04 +000020WORKDIR /go/src/gerrit.opencord.org/kafka-topic-exporter
kartikey dubey72ef3b82019-05-27 06:50:04 +000021ADD . /go/src/gerrit.opencord.org/kafka-topic-exporter
kesavand2cde6582020-06-22 04:56:23 -040022RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -o main .
Matteo Scandolo189526a2018-07-13 09:10:23 -070023
Scott Bakere8537af2018-10-22 14:53:44 -070024FROM alpine:3.8
Ganesh Bhure8bb19822019-06-10 10:56:22 +053025WORKDIR /go/src/gerrit.opencord.org/kafka-topic-exporter/
26COPY --from=builder /go/src/gerrit.opencord.org/kafka-topic-exporter/main .
kartikey dubey72ef3b82019-05-27 06:50:04 +000027# FIXME this should be mounted by the helm charts
28ADD config/conf.yaml /etc/config/conf.yaml
Ganesh Bhure8d0c9942019-05-24 11:42:09 +053029ENTRYPOINT ["./main"]