blob: 1e59813271827b704ea073067ab23855f2724348 [file] [log] [blame]
Dinesh Belwalkar01217962019-05-23 21:51:16 +00001# 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/device-management:latest .
16# docker build -t 10.90.0.101:30500/opencord/kafka-topic-exporter:latest .
17
18FROM golang:1.12-alpine3.9 AS build-env
19RUN mkdir /app
20ADD . /app/
21WORKDIR /app
Dinesh Belwalkarb6b2b302019-06-06 17:30:44 +000022RUN apk add git
23RUN apk add gcc
24RUN apk add build-base
25RUN go get github.com/Shopify/sarama
Dinesh Belwalkar01217962019-05-23 21:51:16 +000026RUN CGO_ENABLED=0 GOOS=linux go build -o main .
27
28FROM alpine:3.9.4
29WORKDIR /app/
30COPY --from=build-env /app/main .
31ENTRYPOINT ["./main"]
32