summaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/docker/init/mariadb-client/Dockerfile
diff options
context:
space:
mode:
authorMandeep Khinda <mandeep.khinda@amdocs.com>2018-04-05 18:26:07 +0000
committerMandeep Khinda <mandeep.khinda@amdocs.com>2018-04-05 20:41:22 +0000
commit1db773e68e50f333369ccde727166805bce2b795 (patch)
tree4aa60d601647554d8ecd02149600f7825d4316b1 /kubernetes/portal/docker/init/mariadb-client/Dockerfile
parente611ada51899fd20ba069e75ad1aa718289d33f8 (diff)
Removing portal schema from configmap
-Trying a new way to initialize maria db's. -Docker image contains project sources and sql files are fetched and executed agains't the target database. -duplicates are silently ignored. -A script that takes some basic params will do the heavy lifting -A 2nd job to make some OOM specific changes (carry over from amsterdam) -docker image has been pushed to oomk8s under the 2.0.0 number Issue-ID: OOM-858 Change-Id: I56d0c9c5aa1d3c4a9df2998634b9147db626d1fb Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
Diffstat (limited to 'kubernetes/portal/docker/init/mariadb-client/Dockerfile')
-rw-r--r--kubernetes/portal/docker/init/mariadb-client/Dockerfile37
1 files changed, 33 insertions, 4 deletions
diff --git a/kubernetes/portal/docker/init/mariadb-client/Dockerfile b/kubernetes/portal/docker/init/mariadb-client/Dockerfile
index 3089bafcfd..009f2fa757 100644
--- a/kubernetes/portal/docker/init/mariadb-client/Dockerfile
+++ b/kubernetes/portal/docker/init/mariadb-client/Dockerfile
@@ -1,11 +1,40 @@
-FROM ubuntu:16.04
+FROM boxfuse/flyway:5.0.7-alpine
+ARG branch=master
ENV no_proxy "localhost,127.0.0.1,.cluster.local,$KUBERNETES_SERVICE_HOST"
# Setup Corporate proxy
ENV https_proxy ${HTTP_PROXY}
ENV http_proxy ${HTTPS_PROXY}
-RUN apt-get update
-RUN apt-get install -y mariadb-client-10.0
+RUN apk add --update \
+ mariadb-client=10.1.28-r1 \
+ git \
+ && rm -rf /var/cache/apk/*
-VOLUME /portal-mysql
+ENV so_branch=$branch
+#ENV policy_branch: $branch
+ENV portal_branch=$branch
+#ENV sdnc_branch: $branch
+#ENV vid_branch: $branch
+#ENV clamp_branch: $branch
+
+#ENV appc_repo: http://gerrit.onap.org/r/appc/deployment.git
+ENV so_repo=http://gerrit.onap.org/r/so/docker-config.git
+#ENV policy_repo: http://gerrit.onap.org/r/policy/docker.git
+ENV portal_repo=http://gerrit.onap.org/r/portal.git
+#ENV sdnc_repo: http://gerrit.onap.org/r/sdnc/oam.git
+#ENV vid_repo: http://gerrit.onap.org/r/vid.git
+#ENV clamp_repo: http://gerrit.onap.org/r/clamp.git
+
+RUN mkdir -p /onap-sources
+WORKDIR /onap-sources
+
+RUN git clone -b $branch $portal_repo && cd portal && git checkout HEAD
+RUN git clone -b $branch $so_repo && cd docker-config && git checkout HEAD
+
+VOLUME /onap-sources
+
+COPY db_migrate.sh /root
+
+RUN chmod a+x /root/db_migrate.sh
+ENTRYPOINT /root/db_migrate.sh