6
6
# This image contains the artifacts used by the later stages.
7
7
# The image is NOT pushed, just the cached layers used.
8
8
9
+ # also change the base image in the other sections
9
10
FROM debian:trixie as build
10
11
LABEL maintainer="Tim Dudgeon<
[email protected] >"
11
12
12
13
ARG GIT_REPO=https://github.com/rdkit/rdkit.git
13
14
ARG GIT_BRANCH=master
14
15
ARG GIT_TAG
15
- ARG POSTGRES_VERSION=17
16
+ # also change the POSTGRES_VER variable in the cartridge image section
17
+ ARG POSTGRES_VER=17
18
+ # also change the BOOST_VER variable in the other sections
16
19
ARG BOOST_VER=1.83
17
- ARG JAVA_VERSION=17
20
+ # also change the JAVA_VER variable in the java image section
21
+ ARG JAVA_VER=17
18
22
19
23
RUN apt-get update &&\
20
24
apt-get install -y --no-install-recommends \
@@ -38,10 +42,10 @@ RUN apt-get update &&\
38
42
libeigen3-dev\
39
43
git\
40
44
wget\
41
- openjdk-$JAVA_VERSION -jdk\
42
- postgresql-$POSTGRES_VERSION \
43
- postgresql-server-dev-$POSTGRES_VERSION \
44
- postgresql-plpython3-$POSTGRES_VERSION \
45
+ openjdk-$JAVA_VER -jdk\
46
+ postgresql-$POSTGRES_VER \
47
+ postgresql-server-dev-$POSTGRES_VER \
48
+ postgresql-plpython3-$POSTGRES_VER \
45
49
zip\
46
50
unzip\
47
51
libfreetype6-dev &&\
@@ -55,8 +59,8 @@ RUN git clone -b $GIT_BRANCH --single-branch $GIT_REPO &&\
55
59
ENV RDBASE=/rdkit
56
60
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib:$RDBASE/Code/JavaWrappers/gmwrapper:/usr/lib/x86_64-linux-gnu:/usr/lib/aarch64-linux-gnu/
57
61
ENV PYTHONPATH=$PYTHONPATH:$RDBASE
58
- RUN ln -s $(ls -d /usr/lib/jvm/java-$JAVA_VERSION -openjdk-*) /usr/lib/jvm/java-$JAVA_VERSION -openjdk
59
- ENV JAVA_HOME=/usr/lib/jvm/java-$JAVA_VERSION -openjdk
62
+ RUN ln -s $(ls -d /usr/lib/jvm/java-$JAVA_VER -openjdk-*) /usr/lib/jvm/java-$JAVA_VER -openjdk
63
+ ENV JAVA_HOME=/usr/lib/jvm/java-$JAVA_VER -openjdk
60
64
ENV CLASSPATH=$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar
61
65
62
66
RUN mkdir $RDBASE/build
@@ -70,8 +74,8 @@ RUN cmake -Wno-dev\
70
74
-DRDK_BUILD_PYTHON_WRAPPERS=ON\
71
75
-DRDK_BUILD_SWIG_WRAPPERS=ON\
72
76
-DRDK_BUILD_PGSQL=ON\
73
- -DPostgreSQL_ROOT=/usr/lib/postgresql/$POSTGRES_VERSION \
74
- -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/$POSTGRES_VERSION /server\
77
+ -DPostgreSQL_ROOT=/usr/lib/postgresql/$POSTGRES_VER \
78
+ -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/$POSTGRES_VER /server\
75
79
-DCMAKE_INSTALL_PREFIX=/usr\
76
80
-DCPACK_PACKAGE_RELOCATABLE=OFF\
77
81
..
@@ -87,10 +91,10 @@ WORKDIR $RDBASE
87
91
88
92
################################# Python image ######################################
89
93
90
- FROM debian:bookworm AS python
94
+ FROM debian:trixie AS python
91
95
LABEL maintainer="Tim Dudgeon<
[email protected] >"
92
96
93
- ARG BOOST_VER=1.81.0
97
+ ARG BOOST_VER=1.83
94
98
95
99
RUN apt-get update &&\
96
100
apt-get upgrade -y &&\
@@ -140,16 +144,16 @@ USER 1000
140
144
# Dockerfile for Java based RDKit implementation
141
145
# Based on Debian.
142
146
143
- FROM debian:bookworm AS java
147
+ FROM debian:trixie AS java
144
148
LABEL maintainer="Tim Dudgeon<
[email protected] >"
145
149
146
- ARG BOOST_VER=1.81
147
- ARG JAVA_VERSION =17
150
+ ARG BOOST_VER=1.83
151
+ ARG JAVA_VER =17
148
152
149
153
RUN apt-get update &&\
150
154
apt-get upgrade -y &&\
151
155
apt-get install -y --no-install-recommends\
152
- openjdk-$JAVA_VERSION -jre-headless\
156
+ openjdk-$JAVA_VER -jre-headless\
153
157
libboost$BOOST_VER\
154
158
libboost$BOOST_VER-dev\
155
159
libboost-system$BOOST_VER\
@@ -169,8 +173,8 @@ RUN dpkg -i /tmp/*.deb && rm -f /tmp/*.deb
169
173
170
174
WORKDIR /
171
175
172
- RUN ln -s $(ls -d /usr/lib/jvm/java-$JAVA_VERSION -openjdk-*) /usr/lib/jvm/java-$JAVA_VERSION -openjdk
173
- ENV JAVA_HOME=/usr/lib/jvm/java-$JAVA_VERSION -openjdk
176
+ RUN ln -s $(ls -d /usr/lib/jvm/java-$JAVA_VER -openjdk-*) /usr/lib/jvm/java-$JAVA_VER -openjdk
177
+ ENV JAVA_HOME=/usr/lib/jvm/java-$JAVA_VER -openjdk
174
178
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/rdkit/gmwrapper
175
179
ENV CLASSPATH=/rdkit/gmwrapper/org.RDKit.jar
176
180
ENV RDBASE=/usr/share/RDKit
@@ -182,16 +186,23 @@ USER 1000
182
186
183
187
################################# Tomcat image ######################################
184
188
185
- FROM informaticsmatters/tomcat:10.1-jre17 AS tomcat
189
+ FROM debian:trixie AS tomcat
186
190
LABEL maintainer="Tim Dudgeon<
[email protected] >"
187
191
188
- ARG BOOST_VER=1.81
192
+ ARG BOOST_VER=1.83
193
+
194
+ ENV TOMCAT_MAJOR 10
195
+ ENV TOMCAT_VERSION 10.1.33
196
+ ENV ARCHIVE apache-tomcat-$TOMCAT_VERSION.tar.gz
197
+ ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
189
198
190
199
USER root
191
200
192
201
RUN apt-get update &&\
193
- apt-get upgrade -y &&\
202
+ apt-get upgrade -y &&\
194
203
apt-get install -y --no-install-recommends\
204
+ openjdk-17-jre-headless\
205
+ curl\
195
206
unzip\
196
207
libboost-system$BOOST_VER\
197
208
libboost-thread$BOOST_VER\
@@ -208,6 +219,23 @@ COPY --from=build /rdkit/Code/JavaWrappers/gmwrapper/org.RDKit.jar /rdkit/Code/J
208
219
COPY --from=build /rdkit/build/RDKit-*-Linux-Runtime.deb /tmp/
209
220
RUN dpkg -i /tmp/*.deb && rm -f /tmp/*.deb
210
221
222
+ RUN useradd -u 501 -U -G 0 -m tomcat
223
+
224
+ WORKDIR /usr/local
225
+
226
+ RUN curl -s -o tomcat.tar.gz -L https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/$ARCHIVE &&\
227
+ tar xfz tomcat.tar.gz &&\
228
+ rm tomcat.tar.gz &&\
229
+ mv apache-tomcat-$TOMCAT_VERSION tomcat &&\
230
+ rm tomcat/bin/*.bat &&\
231
+ rm -rf tomcat/webapps/* &&\
232
+ chown -R 501:0 tomcat &&\
233
+ chmod -R g+r tomcat &&\
234
+ chmod g+w tomcat tomcat/logs tomcat/webapps tomcat/temp tomcat/work tomcat/conf tomcat/bin tomcat/lib
235
+
236
+ WORKDIR /usr/local/tomcat
237
+ ENV CATALINA_HOME /usr/local/tomcat
238
+ EXPOSE 8080
211
239
USER 501
212
240
213
241
WORKDIR $CATALINA_HOME
@@ -217,6 +245,7 @@ ENV RDBASE=/usr/share/RDKit/
217
245
218
246
RUN echo "CLASSPATH=/rdkit/gmwrapper/org.RDKit.jar\n" > /usr/local/tomcat/bin/setenv.sh
219
247
248
+ CMD ["$CATALINA_HOME/bin/catalina.sh", "run"]
220
249
221
250
################################# Cartridge image ###################################
222
251
# Dockerfile for RDKit cartridge based on Debian.
@@ -225,14 +254,14 @@ RUN echo "CLASSPATH=/rdkit/gmwrapper/org.RDKit.jar\n" > /usr/local/tomcat/bin/se
225
254
# build the deb packages so we need to install the packages using apt to have tight control over this.
226
255
#
227
256
228
- FROM debian:bookworm AS cartridge
257
+ FROM debian:trixie AS cartridge
229
258
LABEL maintainer="Tim Dudgeon<
[email protected] >"
230
259
231
- ENV PG_MAJOR=15
232
- ENV BOOST_VER=1.81.0
260
+ ENV POSTGRES_VER=17
261
+ ENV BOOST_VER=1.83
233
262
234
263
RUN apt-get update &&\
235
- apt-get upgrade -y &&\
264
+ apt-get upgrade -y &&\
236
265
apt-get install -y --no-install-recommends\
237
266
python3\
238
267
python3-numpy\
@@ -246,10 +275,10 @@ RUN apt-get update &&\
246
275
libboost-date-time$BOOST_VER\
247
276
libboost-atomic$BOOST_VER\
248
277
libboost-iostreams$BOOST_VER\
249
- libfreetype6\
250
- postgresql-$PG_MAJOR \
251
- postgresql-client-$PG_MAJOR \
252
- postgresql-plpython3-$PG_MAJOR \
278
+ libfreetype6\
279
+ postgresql-$POSTGRES_VER \
280
+ postgresql-client-$POSTGRES_VER \
281
+ postgresql-plpython3-$POSTGRES_VER \
253
282
pgtop\
254
283
gosu\
255
284
wget\
@@ -266,15 +295,15 @@ RUN dpkg -i /tmp/RDKit-*.deb && rm -f /tmp/*.deb
266
295
WORKDIR /
267
296
268
297
# make the sample config easier to munge (and "correct by default")
269
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR /postgresql.conf.sample" /usr/share/postgresql/ \
270
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR /" \
298
+ RUN mv -v "/usr/share/postgresql/$POSTGRES_VER /postgresql.conf.sample" /usr/share/postgresql/ \
299
+ && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$POSTGRES_VER /" \
271
300
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
272
301
273
302
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
274
303
275
304
ENV RDBASE=/usr/share/RDKit
276
305
ENV PGDATA /var/lib/postgresql/data
277
- ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR /bin
306
+ ENV PATH $PATH:/usr/lib/postgresql/$POSTGRES_VER /bin
278
307
# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
279
308
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
280
309
VOLUME /var/lib/postgresql/data
@@ -287,5 +316,3 @@ ENTRYPOINT ["docker-entrypoint.sh"]
287
316
288
317
EXPOSE 5432
289
318
CMD ["postgres"]
290
-
291
-
0 commit comments