You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
1
# Dockerfiles for building RDKit.
2
2
3
-
These images superceed the existing informaticsmatters/rdkit_* Docker images.
3
+
These images supersede the existing informaticsmatters/rdkit_* Docker images.
4
4
5
-
These Dockerfiles and shell scripts are for building various Docker images for RDKit. The aim is to build a number of lightweight images that are suited for running in production cloud environments like Kubernetes and OpenShift. For this purpose the images need to be:
5
+
These Dockerfiles and shell scripts are for building various Docker images for RDKit. The aim is to build a number of
6
+
lightweight images that are suited for running in production cloud environments like Kubernetes and OpenShift. For this
7
+
purpose the images need to be:
6
8
7
-
1. as small as is reasonable to minimise dowload time and reduce the potential attack surface
8
-
1. run as a non-root user or an arbitarily assigned user ID.
9
+
1. as small as is reasonable to minimise download time and reduce the potential attack surface
10
+
2. run as a non-root user or an arbitrarily assigned user ID.
9
11
10
12
The approach taken to build these images currently follows the [builder pattern](https://blog.alexellis.io/mutli-stage-docker-builds/).
11
13
See the [Smaller containers](https://www.informaticsmatters.com/category/containers/index.html) series of posts on the
@@ -15,14 +17,16 @@ For each RDKit version (image tag) we build a number of images:
15
17
16
18
*[informaticsmatters/rdkit-build-debian](https://hub.docker.com/r/informaticsmatters/rdkit-build-debian/) - this does a full build of RDKit from source. The result is a kitchen sink image (almost 2GB in size) that contains the entire build infrastructure and eveything that is built. The main purpose of this image is to build the artifacts needed for assembling the other lightweight images. Whist this image might be of some use for personal hacking it is NOT suitable for a public facing system as it is so large and has such a big attack surface. Earlier versions were named `informaticsmatters/rdkit-build`. NOTE: we have stopped pushing this image as it is large and not very useful.
17
19
*[informaticsmatters/rdkit-python-debian](https://hub.docker.com/r/informaticsmatters/rdkit-python-debian/) - a Debian based distribution designed for running RDKit from Python 2. The image size is approx 400MB. The last Python 2 images are for the `Release_2018_09` release.
18
-
*[informaticsmatters/rdkit-python3-debian](https://hub.docker.com/r/informaticsmatters/rdkit-python3-debian/) - a Debian based distribution designed for running RDKit from Python 3. Thes images start from the `Release_2019_03` release.
20
+
*[informaticsmatters/rdkit-python3-debian](https://hub.docker.com/r/informaticsmatters/rdkit-python3-debian/) - a Debian based distribution designed for running RDKit from Python 3. These images start from the `Release_2019_03` release.
19
21
*[informaticsmatters/rdkit-java-debian](https://hub.docker.com/r/informaticsmatters/rdkit-java-debian/) - a Debian based distribution designed for running RDKit from Java.
20
22
*[informaticsmatters/rdkit-tomcat-debian](https://hub.docker.com/r/informaticsmatters/rdkit-tomcat-debian/) - a Debian based distribution designed for running a servlet in Apache Tomcat that uses the RDKit Java bindings. You need to provide the war file with the web application.
21
23
*[informaticsmatters/rdkit-cartridge-debian](https://hub.docker.com/r/informaticsmatters/rdkit-cartridge-debian/) - a Debian based distribution with PostgreSQL and the RDKit cartridge. Note that we were unable to build cartridge images for the 2021_09 and 2022_03 based releases.
22
24
*[informaticsmatters/rdkit-build-centos](https://hub.docker.com/r/informaticsmatters/rdkit-build-centos/) - Kitchen sink build image equivalent to `informaticsmatters/rdkit-build-debian`.
23
25
*[informaticsmatters/rdkit-python3-centos](https://hub.docker.com/r/informaticsmatters/rdkit-python3-centos/) - a Centos based distribution designed for running RDKit from Python 3. Thes images start from the `Release_2019_09` release.
24
26
*[informaticsmatters/rdkit-java-centos](https://hub.docker.com/r/informaticsmatters/rdkit-java-centos/) - a Centos based distribution designed for running RDKit from Java.
25
27
28
+
Note: we primarily focus on the Debian based images. Other platforms are not so well maintained.
29
+
26
30
## Branches
27
31
28
32
*`master` - build from current RDKit master branch. These images are updated at irregular intervals. Images have tag of `latest`.
@@ -80,20 +84,21 @@ To create images for a new version of RDKit you should only need to create a new
80
84
81
85
## Build and run
82
86
83
-
Create the docker images like this:
84
-
85
-
`./build.sh`
87
+
Since October 2023 we have switched to a multi-stage build and are building images for amd64 and arm64 architectures.
88
+
Thanks to @nmunro and @artran for assistance with building on arm64.
89
+
You need to use the `buildx` extensions to build these images. The Dockerfile-debian is the multi-stage Dockerfile
90
+
that builds all the images, and it is run by executing `build-debian.sh`, which is parameterised through the contents
91
+
of `params.sh`.
86
92
87
-
This builds the main `rdkit-build` image and then extracts the deb and rpm packages and the Java artifacts from it for use in assembling
88
-
the other images, and then assembles those `rdkit-python-debian`, `rdkit-java-debian` and `rdkit-tomcat-debian` images.
93
+
The `build` stage builds RDKit form the appropriate GitHub branch for RDKit, and creates the deb packages and the Java
94
+
artifacts from it for use in the `python`, `java`, `tomcat` and `cartridge` stages.
95
+
Each subsequent stage is run separately and the images pushed to dockerhub. Note: only the amd64 is currently built for
96
+
the `tomcat` image.
89
97
90
-
Push the images to Docker Hub like this:
91
-
92
-
`./push.sh`
93
98
94
99
Run the Python image like this:
95
100
96
-
`docker run -it --rm informaticsmatters/rdkit-python-debian:<tag_name> python`
101
+
`docker run -it --rm informaticsmatters/rdkit-python3-debian:<tag_name> python`
97
102
98
103
Run the Java image like this:
99
104
@@ -123,7 +128,7 @@ Javadocs are built into `/rdkit/Code/JavaWrappers/gmwrapper/doc`. Since the 2019
123
128
## RDBASE environment variable
124
129
125
130
In old versions of the images the RDBASE environment variable was set incorrectly which would impact functions where RDKit
126
-
needs to read it's internal data files. Since the `2020_03`, `2019_09` and `2019_09_3` images this should be correctly set, but older images will
131
+
needs to read its internal data files. Since the `2020_03`, `2019_09` and `2019_09_3` images this should be correctly set, but older images will
127
132
suffer this problem and to fix it you must define the RDBASE environment variable when you run the container and set it
128
133
to a value of `/usr/share/RDKit`. e.g. `docker run -it -e RDBASE=/usr/share/RDKit ...`
129
134
@@ -140,11 +145,12 @@ images from 2019 onwards are built with Java 11.
140
145
141
146
## RDKit cartridge
142
147
143
-
We have now started to handle the RDKit postgres cartridge in a debian environment as a series of `informaticsmatters/rdkit-cartridge-debian` images.
148
+
We have now started to handle the RDKit postgres cartridge in a debian environment as a series of
0 commit comments