@@ -16,11 +16,9 @@ RUN apt-get update \
16
16
maven \
17
17
make \
18
18
gcc \
19
+ # openssl \
19
20
zlib1g-dev
20
21
21
- RUN apt -y update
22
-
23
-
24
22
ARG OPENSSL_VERSION=1.1.1q
25
23
ARG PYTHON=python3
26
24
ARG PIP=pip3
@@ -56,48 +54,36 @@ WORKDIR /sagemaker-sparkml-model-server
56
54
57
55
RUN mvn clean package
58
56
59
- RUN cp ./target/sparkml-serving-3.3.jar /usr/local/lib/sparkml-serving-3.3.jar
60
- RUN cp ./serve.sh /usr/local/bin/serve.sh
61
-
62
- RUN chmod a+x /usr/local/bin/serve.sh
57
+ RUN cp ./target/sparkml-serving-3.3.jar /usr/local/lib/sparkml-serving-3.3.jar \
58
+ && cp ./serve.sh /usr/local/bin/serve.sh \
59
+ && chmod a+x /usr/local/bin/serve.sh
63
60
64
61
# remove the maven-shared-utils packages - older versions create vulnerabilities
65
- RUN find / -depth -name maven-shared-utils -type d -exec rm -r "{}" \;
66
-
67
- # remove the surefire packages - contains versions of maven-shared-utils that create vulnerabilities
68
- RUN find / -depth -name surefire -type d -exec rm -r "{}" \;
69
-
70
- # remove maven-shared-utils jar file with vulnerabilities
71
- # comment out if need to use maven utilities
72
- RUN rm /usr/share/java/maven-shared-utils.jar
73
-
74
- # remove wagon-http-shaded jar file with vulnerabilities associated with org.jsoup:jsoup
75
- RUN rm /usr/share/java/wagon-http-shaded-3.3.4.jar
76
-
77
- # remove plexus-utils directory because plexus-utils has vulnerabilities
78
- # comment out if need to use maven utilities
79
- RUN find / -depth -name plexus-utils -type d -exec rm -r "{}" \;
80
-
81
- # remove old version of commons-compress with vulnerability
82
- RUN find / -depth -name commons-compress -type d -exec rm -r "{}/1.20" \;
83
-
84
- # remove jar files from common-io v2.5 and 2.6 both have vulnerabilities
85
- RUN find / -name commons-io*2.5.jar -type f -exec rm "{}" \;
86
- RUN find / -name commons-io*2.6.jar -type f -exec rm "{}" \;
87
-
88
- # remove jackson-databind
89
- RUN find / -name jackson-databind -type d -exec rm -r "{}/2.13.3" \;
90
-
91
- # remove junit-4.12.jar
92
- RUN find / -name junit-4.12.jar -type f -exec rm "{}" \;
93
-
94
- # remove maven-compiler-plugin jar from maven repo
95
- RUN find / -name maven-compiler-plugin*.jar -type f -exec rm "{}" \;
96
-
97
- # remove guava jar files
98
- RUN rm /usr/share/java/guava.jar && rm /root/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
99
-
100
- # remove commons-codec jar
101
- RUN find / -name commons-codec-1.11.jar -type f -exec rm "{}" \;
62
+ RUN find / -depth -name maven-shared-utils -type d -exec rm -r "{}" \; \
63
+ # remove the surefire packages - contains versions of maven-shared-utils that create vulnerabilities
64
+ && find / -depth -name surefire -type d -exec rm -r "{}" \; \
65
+ # remove maven-shared-utils jar file with vulnerabilities
66
+ # comment out if need to use maven utilities
67
+ && rm /usr/share/java/maven-shared-utils.jar \
68
+ # remove wagon-http-shaded jar file with vulnerabilities associated with org.jsoup:jsoup
69
+ && rm /usr/share/java/wagon-http-shaded-3.3.4.jar \
70
+ # remove plexus-utils directory because plexus-utils has vulnerabilities
71
+ # comment out if need to use maven utilities
72
+ && find / -depth -name plexus-utils -type d -exec rm -r "{}" \; \
73
+ # remove old version of commons-compress with vulnerability
74
+ && find / -depth -name commons-compress -type d -exec rm -r "{}/1.20" \; \
75
+ # remove jar files from common-io v2.5 and 2.6 both have vulnerabilities
76
+ && find / -name commons-io*2.5.jar -type f -exec rm "{}" \; \
77
+ && find / -name commons-io*2.6.jar -type f -exec rm "{}" \; \
78
+ # remove jackson-databind
79
+ && find / -name jackson-databind -type d -exec rm -r "{}/2.13.3" \; \
80
+ # remove junit-4.12.jar
81
+ && find / -name junit-4.12.jar -type f -exec rm "{}" \; \
82
+ # remove maven-compiler-plugin jar from maven repo
83
+ && find / -name maven-compiler-plugin*.jar -type f -exec rm "{}" \; \
84
+ # remove guava jar files
85
+ && rm /usr/share/java/guava.jar && rm /root/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar \
86
+ # remove commons-codec jar
87
+ && find / -name commons-codec-1.11.jar -type f -exec rm "{}" \;
102
88
103
89
ENTRYPOINT ["/usr/local/bin/serve.sh" ]
0 commit comments