Pamela Dragosh | 9bd4bf6 | 2017-03-30 12:46:08 -0400 | [diff] [blame] | 1 | FROM onap/policy/policy-os |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 2 | |
| 3 | RUN \ |
Pamela Dragosh | 6d4e15f | 2017-03-08 13:58:22 -0500 | [diff] [blame] | 4 | apt-get clean && \ |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 5 | apt-get install -y apt-transport-https && \ |
| 6 | apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db && \ |
Pamela Dragosh | d30ceee | 2017-03-08 21:14:47 -0500 | [diff] [blame] | 7 | add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main' && \ |
Pamela Dragosh | 6d4e15f | 2017-03-08 13:58:22 -0500 | [diff] [blame] | 8 | apt-get clean && \ |
Pamela Dragosh | d1728dc | 2017-02-14 19:57:17 -0500 | [diff] [blame] | 9 | apt-get update && \ |
| 10 | apt-get install -y mariadb-server && \ |
| 11 | touch /var/lib/mysql/firstrun |
| 12 | |
| 13 | COPY dbinit.sh do-start.sh /tmp/ |
| 14 | RUN bash /tmp/dbinit.sh |
| 15 | |
| 16 | # mount volumes to persist the data |
| 17 | VOLUME /etc/mysql /var/lib/mysql |
| 18 | |
| 19 | CMD exec bash /tmp/do-start.sh |