Remove force update and ca certificates
[aai/model-loader.git] / src / main / docker / Dockerfile
1 ###
2 # ============LICENSE_START=======================================================
3 # MODEL LOADER SERVICE
4 # ================================================================================
5 # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
19 ###
20
21 FROM ubuntu:14.04
22 ARG jettyrel=9.3.9.v20160517
23 ARG jettydist=jetty-distribution-${jettyrel}
24 ARG jettybase=/opt/jetty
25
26 RUN apt-get update && apt-get --force-yes -y -f install wget
27
28 # Install java8
29 RUN apt-get install -y software-properties-common
30
31 # sudo -E is required to preserve the environment
32 # If you remove that line, it will most like freeze at this step
33
34 RUN apt-get install --reinstall ca-certificates && \
35                 sudo -E add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk
36
37 # Setup JAVA_HOME, this is useful for docker commandline
38
39 ENV JAVA_HOME usr/lib/jvm/java-8-openjdk-amd64
40 RUN export JAVA_HOME
41
42 RUN wget http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jettyrel}/${jettydist}.tar.gz
43 RUN gunzip ${jettydist}.tar.gz && tar xvf ${jettydist}.tar
44
45 COPY model-loader* $jettydist/webapps/model-loader/
46
47 COPY startup.sh update_config.sh ${jettydist}/bin/
48 RUN chmod 700 ${jettydist}/bin/startup.sh && chmod 700 ${jettydist}/bin/update_config.sh
49 RUN mkdir -p ${jettybase}
50 RUN mv ${jettydist} ${jettybase}/${jettydist}
51 RUN rm -rf $jettybase/$jettydist/demo-base
52
53 CMD /opt/jetty/*/bin/startup.sh