Matteo Scandolo | bea9527 | 2017-08-08 13:05:23 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-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 | |
| 16 | |
Zack Williams | 46c952d | 2017-07-17 11:16:26 -0700 | [diff] [blame] | 17 | # Dockerfile for onos-apps maven repo |
Andy Bavier | 25ebf0e | 2017-06-06 18:27:15 -0400 | [diff] [blame] | 18 | |
Zack Williams | 46c952d | 2017-07-17 11:16:26 -0700 | [diff] [blame] | 19 | FROM maven:3-jdk-8 as maven |
| 20 | COPY settings.xml /root/.m2/settings.xml |
| 21 | COPY . /mavenwd |
| 22 | WORKDIR /mavenwd/apps |
Andy Bavier | bcf3629 | 2017-08-31 12:50:09 -0700 | [diff] [blame^] | 23 | RUN mvn dependency:copy-dependencies -Dmdep.copyPom=false -Dmdep.useRepositoryLayout=true -DoutputDirectory=m2/repository -Dmdep.addParentPoms=false -Dtype=oar -DexcludeTypes=jar -Dsilent=true -f dependencies.xml |
Andy Bavier | 25ebf0e | 2017-06-06 18:27:15 -0400 | [diff] [blame] | 24 | |
| 25 | FROM nginx |
Zack Williams | 46c952d | 2017-07-17 11:16:26 -0700 | [diff] [blame] | 26 | WORKDIR /usr/share/nginx/html |
| 27 | COPY --from=maven /mavenwd/repository repository |
Andy Bavier | 25ebf0e | 2017-06-06 18:27:15 -0400 | [diff] [blame] | 28 | RUN chown nginx:nginx -R /usr/share/nginx/html/repository |
| 29 | |
Zack Williams | 46c952d | 2017-07-17 11:16:26 -0700 | [diff] [blame] | 30 | # Label image |
| 31 | ARG org_label_schema_schema_version=1.0 |
| 32 | ARG org_label_schema_name=opencord/mavenrepo |
| 33 | ARG org_label_schema_version=unknown |
| 34 | ARG org_label_schema_vcs_url=unknown |
| 35 | ARG org_label_schema_vcs_ref=unknown |
| 36 | ARG org_label_schema_build_date=unknown |
| 37 | ARG org_opencord_vcs_commit_date=unknown |
| 38 | |
| 39 | LABEL org.label-schema.schema-version=$org_label_schema_schema_version \ |
| 40 | org.label-schema.name=$org_label_schema_name \ |
| 41 | org.label-schema.version=$org_label_schema_version \ |
| 42 | org.label-schema.vcs-url=$org_label_schema_vcs_url \ |
| 43 | org.label-schema.vcs-ref=$org_label_schema_vcs_ref \ |
| 44 | org.label-schema.build-date=$org_label_schema_build_date \ |
| 45 | org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date |