Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / portal / docker / init / mariadb-client / Dockerfile
1 # Copyright © 2018 Amdocs, Bell Canada, AT&T
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 FROM boxfuse/flyway:5.0.7-alpine
16
17 ARG branch=3.0.0-ONAP
18 ENV no_proxy "localhost,127.0.0.1,.cluster.local,$KUBERNETES_SERVICE_HOST"
19 # Setup Corporate proxy
20 ENV https_proxy ${HTTP_PROXY}
21 ENV http_proxy ${HTTPS_PROXY}
22
23 RUN apk add --update \
24     mariadb-client=10.1.32-r0 \
25     git \
26   && rm -rf /var/cache/apk/*
27
28 ENV so_branch=$branch
29 #ENV policy_branch: $branch
30 ENV portal_branch=$branch
31 #ENV sdnc_branch: $branch
32 #ENV vid_branch: $branch
33 #ENV clamp_branch: $branch
34
35 #ENV appc_repo: http://gerrit.onap.org/r/appc/deployment.git
36 ENV so_repo=http://gerrit.onap.org/r/so/docker-config.git
37 #ENV policy_repo: http://gerrit.onap.org/r/policy/docker.git
38 ENV portal_repo=http://gerrit.onap.org/r/portal.git
39 #ENV sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
40 #ENV vid_repo: http://gerrit.onap.org/r/vid.git
41 #ENV clamp_repo: http://gerrit.onap.org/r/clamp.git
42
43 RUN mkdir -p /onap-sources
44 WORKDIR /onap-sources
45
46 RUN git clone -b $branch $portal_repo && cd portal && git checkout HEAD
47 RUN git clone -b $branch $so_repo && cd docker-config && git checkout HEAD
48
49 VOLUME /onap-sources
50
51 COPY db_migrate.sh /root
52
53 RUN chmod a+x /root/db_migrate.sh
54 ENTRYPOINT /root/db_migrate.sh