blob: e1d147dfa9e8d314f51990bfeb5ba3f07bd2813a [file] [log] [blame]
Mike Elliott586f03b2017-09-08 12:46:15 -04001FROM ubuntu:16.04
2
3# Install additional packages
4RUN apt-get update && apt-get -y install maven openjdk-8-jdk unzip python-pip curl dnsutils vim gawk wget openssh-client-ssh1
5RUN pip install pyyaml
6
7RUN apt-get update && apt-get install -y postgresql libpq5 repmgr python-psycopg2 python3-psycopg2 libgetopt-java
8RUN rm -f /usr/sbin/policy-rc.d
9
10# Install Groovy
11RUN mkdir -p /opt/app
12RUN (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 )
13RUN (cd /opt/app ; unzip apache-groovy-binary-2.4.6.zip )
14RUN mkdir -p /opt/app/java/jdk
15RUN ln -s /usr /opt/app/java/jdk/jdk170
16RUN mkdir -p /opt/app/groovy
17RUN ln -s /opt/app/groovy-2.4.6 /opt/app/groovy/246
18
19# Create user dcae
20RUN if [ ! -e /home/dcae ]; then useradd -m -s /bin/bash dcae; fi
21
22# Download required packages
23RUN 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
24RUN 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
25RUN 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
26RUN 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
27RUN 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
29RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*
30
31RUN mkdir -p /opt/tools
32RUN mkdir -p /dbroot/pgdata
33RUN mkdir -p /dbroot/pglogs
34
35EXPOSE 5432
36
37VOLUME /opt/tools
38VOLUME /dbroot/pgdata
39VOLUME /dbroot/pglogs
40
41# Setup the entrypoint
42COPY setup.sh /usr/local/bin/entrypoint.sh
43RUN chmod a+x /usr/local/bin/entrypoint.sh
44
45ENTRYPOINT ["usr/local/bin/entrypoint.sh"]