subhash kumar singh | e63192f | 2020-12-11 14:25:11 +0530 | [diff] [blame^] | 1 | # Copyright (c) 2020 Samsung. |
| 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 | #---------------------------------------------------------- |
| 16 | # |
| 17 | #---------------------------------------------------------- |
| 18 | |
| 19 | FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:9-u18.04 as xapp-base |
| 20 | RUN apt-get update -y \ |
| 21 | &&apt-get install -y \ |
| 22 | apt-utils \ |
| 23 | cmake \ |
| 24 | gawk \ |
| 25 | sudo \ |
| 26 | nano \ |
| 27 | jq \ |
| 28 | gettext-base \ |
| 29 | bison \ |
| 30 | flex \ |
| 31 | curl \ |
| 32 | tree |
| 33 | |
| 34 | RUN curl -s https://packagecloud.io/install/repositories/o-ran-sc/master/script.deb.sh | bash |
| 35 | |
| 36 | # RMR |
| 37 | ARG RMRVERSION=4.2.2 |
| 38 | #RUN apt-get install -y rmr=${RMRVERSION} rmr-dev=${RMRVERSION} |
| 39 | RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb |
| 40 | RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb |
| 41 | RUN rm -f rmr_${RMRVERSION}_amd64.deb rmr-dev_${RMRVERSION}_amd64.deb |
| 42 | |
| 43 | # |
| 44 | RUN ldconfig |
| 45 | |
| 46 | # |
| 47 | ENV PATH="/usr/local/go/bin:${PATH}" |
| 48 | |
| 49 | WORKDIR "/" |
| 50 | CMD ["/bin/bash"] |
| 51 | |
| 52 | #---------------------------------------------------------- |
| 53 | # |
| 54 | #---------------------------------------------------------- |
| 55 | FROM xapp-base as xapp-base-testbuild |
| 56 | |
| 57 | |
| 58 | RUN mkdir -p /ws |
| 59 | WORKDIR "/ws" |
| 60 | |
| 61 | COPY . /ws |
| 62 | # Module prepare (if go.mod/go.sum updated) |
| 63 | #COPY go.mod /ws |
| 64 | #COPY go.sum /ws |
| 65 | #RUN go mod download |
| 66 | |
| 67 | #RUN go build hwApp.go |
| 68 | |