github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/containers/compilers/osv/java-compiler/Dockerfile (about)

     1  FROM ubuntu:16.04
     2  
     3  RUN apt-get update -y && \
     4   apt-get install -y software-properties-common && \
     5   add-apt-repository -y ppa:openjdk-r/ppa && \
     6   apt-get update -y && \
     7   apt-get install -y qemu maven wget git openjdk-7-jdk curl && \
     8   apt-get install -y build-essential && \
     9   apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
    10  
    11  
    12  RUN curl https://storage.googleapis.com/golang/go1.11.1.linux-amd64.tar.gz | tar xz -C /usr/local && mv /usr/local/go /usr/local/go1.5 && ln -s /usr/local/go1.5 /usr/local/go
    13  
    14  
    15  ENV GOPATH=/go
    16  ENV GOBIN=$GOPATH/bin
    17  ENV PATH=$GOBIN:/usr/local/go/bin:$PATH
    18  
    19  RUN mkdir -p $GOPATH/src/github.com/cloudius-systems
    20  RUN cd $GOPATH/src/github.com/cloudius-systems && git clone https://github.com/emc-advanced-dev/capstan
    21  RUN cd $GOPATH/src/github.com/cloudius-systems/capstan && ./install
    22  
    23  RUN capstan pull cloudius/osv-openjdk8
    24  
    25  VOLUME /project_directory
    26  COPY java-main-caller/target/jar-wrapper-1.0-SNAPSHOT-jar-with-dependencies.jar /program.jar
    27  
    28  #Build base jar runner
    29  COPY Capstanfile-jar /tmp/Capstanfile-jar
    30  
    31  RUN mkdir /jar-runner/ && \
    32      mv /tmp/Capstanfile-jar /jar-runner/Capstanfile && \
    33      cd /jar-runner/ && \
    34      capstan build unik-jar-runner &&\
    35      rm -rf /jar-runner
    36  
    37  #Build base tomcat image
    38  COPY Capstanfile-war /tmp/Capstanfile-war
    39  
    40  RUN cd / && git clone https://github.com/cloudius-systems/osv-apps && \
    41      cd /osv-apps/tomcat && \
    42      make && \
    43      cd /osv-apps/tomcat && sed -i -e 's/port="8081"/port="${port.http.nonssl}"/g' ROOTFS/usr/tomcat/conf/server.xml && \
    44      mv /tmp/Capstanfile-war /osv-apps/tomcat/Capstanfile && \
    45      cd /osv-apps/tomcat && \
    46      capstan build unik-tomcat &&\
    47      rm -rf /osv-apps
    48  
    49  COPY java-compiler /
    50  
    51  ENTRYPOINT ["/java-compiler"]
    52  
    53  #run this container with
    54  #docker run --rm --privileged -v SOURCE_ROOT:/project_directory projectunik/osv-java-compiler