Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2018-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Matteo Scandolo | 9a2772a | 2018-11-19 14:56:26 -0800 | [diff] [blame] | 16 | # docker build -t opencord/sadis-server:candidate . |
Matteo Scandolo | a79e608 | 2018-08-21 14:16:47 -0700 | [diff] [blame] | 17 | |
Matteo Scandolo | 9a2772a | 2018-11-19 14:56:26 -0800 | [diff] [blame] | 18 | FROM golang:1.10-stretch as builder |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 19 | MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| 20 | |
| 21 | WORKDIR /go |
| 22 | ADD . /go/src/gerrit.opencord.org/sadis-server |
Matteo Scandolo | 9a2772a | 2018-11-19 14:56:26 -0800 | [diff] [blame] | 23 | RUN CGO_ENABLED=0 GOOS=linux go build -o /build/entry-point gerrit.opencord.org/sadis-server |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 24 | |
Jingzhao.Ni | d3bd1f2 | 2019-05-30 16:53:02 +0800 | [diff] [blame] | 25 | # The amd64 and arm64 are supported by alpine:3.6. |
| 26 | FROM alpine:3.9 |
Jonathan Hart | f86817b | 2018-08-17 10:35:54 -0700 | [diff] [blame] | 27 | MAINTAINER Open Networking Foundation <info@opennetworking.org> |
| 28 | |
| 29 | COPY --from=builder /build/entry-point /service/entry-point |
| 30 | |
| 31 | EXPOSE 8000 |
| 32 | |
| 33 | WORKDIR /service |
| 34 | ENTRYPOINT ["/service/entry-point"] |