Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
| 3 | # Install additional packages |
| 4 | RUN apt-get update && apt-get -y install maven openjdk-8-jdk unzip python-pip curl dnsutils vim gawk wget openssh-client-ssh1 |
| 5 | RUN pip install pyyaml |
| 6 | |
| 7 | RUN apt-get update && apt-get install -y postgresql libpq5 repmgr python-psycopg2 python3-psycopg2 libgetopt-java |
| 8 | RUN rm -f /usr/sbin/policy-rc.d |
| 9 | |
| 10 | # Install Groovy |
| 11 | RUN mkdir -p /opt/app |
| 12 | RUN (cd /opt/app ; curl -Lo apache-groovy-binary-2.4.6.zip https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.4.6.zip ) |
| 13 | RUN (cd /opt/app ; unzip apache-groovy-binary-2.4.6.zip ) |
| 14 | RUN mkdir -p /opt/app/java/jdk |
| 15 | RUN ln -s /usr /opt/app/java/jdk/jdk170 |
| 16 | RUN mkdir -p /opt/app/groovy |
| 17 | RUN ln -s /opt/app/groovy-2.4.6 /opt/app/groovy/246 |
| 18 | |
| 19 | # Create user dcae |
| 20 | RUN if [ ! -e /home/dcae ]; then useradd -m -s /bin/bash dcae; fi |
| 21 | |
| 22 | # Download required packages |
| 23 | RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-cdf_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-cdf_1.0.0.deb |
| 24 | RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-postgresql-prep_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-postgresql-prep_1.0.0.deb |
| 25 | RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-postgresql-config_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-postgresql-config_1.0.0.deb |
| 26 | RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-pgaas_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-pgaas_1.0.0.deb |
| 27 | RUN curl -s -k -f -o /tmp/org.openecomp.dcae.storage.pgaas-pgaas-post_1.0.0.deb https://nexus.onap.org/content/sites/raw/org.openecomp.dcae.pgaas/deb-releases/org.openecomp.dcae.storage.pgaas-pgaas-post_1.0.0.deb |
| 28 | |
| 29 | RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/* |
| 30 | |
| 31 | RUN mkdir -p /opt/tools |
| 32 | RUN mkdir -p /dbroot/pgdata |
| 33 | RUN mkdir -p /dbroot/pglogs |
| 34 | |
| 35 | EXPOSE 5432 |
| 36 | |
| 37 | VOLUME /opt/tools |
| 38 | VOLUME /dbroot/pgdata |
| 39 | VOLUME /dbroot/pglogs |
| 40 | |
| 41 | # Setup the entrypoint |
| 42 | COPY setup.sh /usr/local/bin/entrypoint.sh |
| 43 | RUN chmod a+x /usr/local/bin/entrypoint.sh |
| 44 | |
| 45 | ENTRYPOINT ["usr/local/bin/entrypoint.sh"] |