blob: a46b225be0c9e52a63312281e26aa35641e96cbe [file] [log] [blame]
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00001# 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
Mandeep Khinda1db773e2018-04-05 18:26:07 +000015FROM boxfuse/flyway:5.0.7-alpine
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016
Mike Elliott3e0bad92018-11-28 15:58:53 -050017ARG branch=3.0.0-ONAP
Mandeep Khindad6ea9872017-06-24 11:49:37 -040018ENV no_proxy "localhost,127.0.0.1,.cluster.local,$KUBERNETES_SERVICE_HOST"
19# Setup Corporate proxy
barak131c2a42017-06-27 02:45:02 +030020ENV https_proxy ${HTTP_PROXY}
21ENV http_proxy ${HTTPS_PROXY}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040022
Mandeep Khinda1db773e2018-04-05 18:26:07 +000023RUN apk add --update \
Mandeep Khinda9f314ea2018-09-19 19:57:25 +000024 mariadb-client=10.1.32-r0 \
Mandeep Khinda1db773e2018-04-05 18:26:07 +000025 git \
26 && rm -rf /var/cache/apk/*
Mandeep Khindad6ea9872017-06-24 11:49:37 -040027
Mandeep Khinda1db773e2018-04-05 18:26:07 +000028ENV so_branch=$branch
29#ENV policy_branch: $branch
30ENV portal_branch=$branch
31#ENV sdnc_branch: $branch
32#ENV vid_branch: $branch
33#ENV clamp_branch: $branch
34
Mandeep Khinda1db773e2018-04-05 18:26:07 +000035ENV so_repo=http://gerrit.onap.org/r/so/docker-config.git
36#ENV policy_repo: http://gerrit.onap.org/r/policy/docker.git
37ENV portal_repo=http://gerrit.onap.org/r/portal.git
38#ENV sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
39#ENV vid_repo: http://gerrit.onap.org/r/vid.git
40#ENV clamp_repo: http://gerrit.onap.org/r/clamp.git
41
42RUN mkdir -p /onap-sources
43WORKDIR /onap-sources
44
45RUN git clone -b $branch $portal_repo && cd portal && git checkout HEAD
46RUN git clone -b $branch $so_repo && cd docker-config && git checkout HEAD
47
48VOLUME /onap-sources
49
50COPY db_migrate.sh /root
51
52RUN chmod a+x /root/db_migrate.sh
53ENTRYPOINT /root/db_migrate.sh