Dinesh Belwalkar | 0121796 | 2019-05-23 21:51:16 +0000 | [diff] [blame] | 1 | # 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 | |
| 18 | FROM golang:1.12-alpine3.9 AS build-env |
| 19 | RUN mkdir /app |
| 20 | ADD . /app/ |
| 21 | WORKDIR /app |
| 22 | RUN CGO_ENABLED=0 GOOS=linux go build -o main . |
| 23 | |
| 24 | FROM alpine:3.9.4 |
| 25 | WORKDIR /app/ |
| 26 | COPY --from=build-env /app/main . |
| 27 | ENTRYPOINT ["./main"] |
| 28 | |