ebae7b138af1ff3c805127c68136b7e6afccd845
[sdc/sdc-workflow-designer.git] / distribution / src / main / docker / Dockerfile
1 FROM ubuntu:16.04
2
3 MAINTAINER "Lv Bo" <lv.bo163@zte.com.cn>
4
5 EXPOSE 8080
6
7 #install openjdk-1.8
8 #RUN sed -i 's#http://archive.ubuntu.com#http://mirrors.163.com#g' /etc/apt/sources.list
9 RUN apt-get update
10 RUN apt-get install -y openjdk-8-jdk
11
12 RUN apt-get -y upgrade
13
14
15 # Install specific system libraries to fix CVE vulnerabilities
16 RUN echo "deb http://archive.ubuntu.com/ubuntu/ artful main restricted" >> /etc/apt/sources.list && \
17     echo "deb http://security.ubuntu.com/ubuntu/ artful-security main restricted" >> /etc/apt/sources.list && \
18     echo "deb http://archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list && \
19     apt-get -y update
20
21 # krb5 1.16-2build1
22 #   For CVE-2017-15088 CVE-2017-11462
23 # libvorbis 1.3.5-4ubuntu0.2
24 #   For CVE-2017-14632 CVE-2017-14160
25 # libx11 2:1.6.4-3
26 #    For CVE-2016-7943 CVE-2016-7942
27 # libxtst 1.2.3-1
28 #    For CVE-2016-7951
29 # ncurses 6.1-1ubuntu1
30 #    For CVE-2017-10685 CVE-2017-10684
31 # libsqllite3-0 3.22.0-1
32 #   For CVE-2017-10989
33 # libtiff5 4.0.8-5ubuntu0.1
34 #   For CVE-2017-9117 CVE-2016-9540 CVE-2016-9539 CVE-2016-9538 CVE-2016-9537 CVE-2016-9536 CVE-2016-9535 CVE-2016-9534 CVE-2016-9533 CVE-2015-8668 CVE-2015-7554 CVE-2016-6223 CVE-2017-5563 CVE-2016-3621 CVE-2016-8331
35 # shadow 1:4.5-1ubuntu1
36 #   For CVE-2017-12424
37 # perl-base 5.26.0-8ubuntu1.1
38 #   For CVE-2015-8608 CVE-2017-12883
39 # openssl 1.1.0g-2ubuntu3
40 #   For CVE-2016-6303 CVE-2016-2182 CVE-2016-2177 CVE-2016-2176
41 # zlib1g 1:1.2.11.dfsg-0ubuntu2
42 #   For CVE-2016-9843 CVE-2016-9841 CVE-2016-9842 CVE-2016-9840
43
44 RUN apt-get -y install \
45     libkrb5-3=1.16-2build1 krb5-locales=1.16-2build1 \
46     libvorbis0a=1.3.5-4ubuntu0.2 \
47     libx11-6=2:1.6.4-3 libx11-data=2:1.6.4-3 libx11-doc=2:1.6.4-3 libx11-xcb1=2:1.6.4-3 \
48     libxtst6=2:1.2.3-1 \
49     ncurses-base=6.1-1ubuntu1 ncurses-bin=6.1-1ubuntu1 libncurses5=6.1-1ubuntu1 libncursesw5=6.1-1ubuntu1 \
50     libsqlite3-0=3.22.0-1 \
51     libtiff5=4.0.8-5ubuntu0.1 \
52     passwd=1:4.5-1ubuntu1 \
53     perl-base=5.26.0-8ubuntu1.1 \
54     openssl=1.1.0g-2ubuntu3 \
55     zlib1g=1:1.2.11.dfsg-0ubuntu2
56
57
58 #configure the JDK
59 RUN sed -i 's|#networkaddress.cache.ttl=-1|networkaddress.cache.ttl=10|' /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
60 ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
61 ENV PATH $PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin
62 ENV CLASSPATH .:${JAVA_HOME}/lib:${JRE_HOME}/lib
63 ENV JRE_HOME ${JAVA_HOME}/jre
64
65 #add workflow designer related resources to the docker image
66 RUN mkdir /home/sdc-workflow-designer
67 WORKDIR /home/sdc-workflow-designer
68 ADD sdc-workflow-designer-*-linux64.tar.gz /home/sdc-workflow-designer/
69 RUN chmod 755 /home/sdc-workflow-designer/bin/*.sh
70
71 ENTRYPOINT /home/sdc-workflow-designer/bin/run.sh
72