Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
| 3 | # Setup apt.conf proxy settings |
| 4 | #RUN echo 'Acquire::http::proxy "http://some.proxy:8084/";' >> /etc/apt/apt.conf |
| 5 | |
| 6 | # Setup Corporate proxy |
| 7 | #ENV no_proxy "localhost,127.0.0.1,localaddress,.localdomain.com,192.168.141.0/24" |
| 8 | #ENV https_proxy http://some.proxy:8084/ |
| 9 | #ENV http_proxy http://fsome.proxy:8084/ |
| 10 | #ENV HTTP_PROXY http://some.proxy:8084/ |
| 11 | #ENV HTTPS_PROXY http://some.proxy:8084/ |
| 12 | #ENV FTP_PROXY http://some.proxy:8084/ |
| 13 | #ENV NO_PROXY "localhost,127.0.0.1,localaddress,.localdomain.com,192.168.141.0/24" |
| 14 | |
| 15 | # Additional packages |
| 16 | RUN apt-get update -y |
| 17 | RUN apt-get install -y git wget unzip curl dnsutils sudo |
| 18 | RUN apt-get install -y maven unzip |
| 19 | |
| 20 | # Install python and pip |
| 21 | RUN apt-get install -y python |
| 22 | RUN wget https://bootstrap.pypa.io/get-pip.py |
| 23 | RUN python get-pip.py |
| 24 | RUN rm get-pip.py |
| 25 | RUN pip install pyyaml |
| 26 | |
| 27 | # Install Groovy |
| 28 | RUN mkdir -p /opt/app |
| 29 | 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 ) |
| 30 | RUN (cd /opt/app ; unzip apache-groovy-binary-2.4.6.zip ) |
| 31 | RUN mkdir -p /opt/app/java/jdk |
| 32 | RUN ln -s /usr /opt/app/java/jdk/jdk170 |
| 33 | RUN mkdir -p /opt/app/groovy |
| 34 | RUN ln -s /opt/app/groovy-2.4.6 /opt/app/groovy/246 |
| 35 | ENV JAVA_HOME /opt/app/java/jdk/jdk170 |
| 36 | |
| 37 | # Create user dcae |
| 38 | RUN if [ ! -e /home/dcae ]; then useradd -m -s /bin/bash dcae; fi |
| 39 | |
| 40 | # Hadoop |
| 41 | EXPOSE 8020 8025 50070 50075 50010 50020 |
| 42 | |
| 43 | # Zookeeper |
| 44 | EXPOSE 3888 2888 2181 |
| 45 | |
| 46 | VOLUME /opt/tools |
| 47 | VOLUME /opt/data |
| 48 | |
| 49 | # Provisioning |
| 50 | COPY 00-provisioning.sh /usr/local/bin/00-provisioning.sh |
| 51 | RUN chmod a+x /usr/local/bin/00-provisioning.sh |
| 52 | RUN /usr/local/bin/00-provisioning.sh |
| 53 | |
| 54 | # define the entrypoint |
| 55 | COPY 01-entrypoint.sh /usr/local/bin/01-entrypoint.sh |
| 56 | RUN chmod a+x /usr/local/bin/01-entrypoint.sh |
| 57 | ENTRYPOINT ["/usr/local/bin/01-entrypoint.sh"] |