Skip to content

Commit dd5b24b

Browse files
committed
updated README
1 parent ba2c3a5 commit dd5b24b

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Dockerfiles for building RDKit.
22

3-
These images superceed the existing informaticsmatters/rdkit_* Docker images.
3+
These images supersede the existing informaticsmatters/rdkit_* Docker images.
44

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:
68

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.
911

1012
The approach taken to build these images currently follows the [builder pattern](https://blog.alexellis.io/mutli-stage-docker-builds/).
1113
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:
1517

1618
* [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.
1719
* [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.
1921
* [informaticsmatters/rdkit-java-debian](https://hub.docker.com/r/informaticsmatters/rdkit-java-debian/) - a Debian based distribution designed for running RDKit from Java.
2022
* [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.
2123
* [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.
2224
* [informaticsmatters/rdkit-build-centos](https://hub.docker.com/r/informaticsmatters/rdkit-build-centos/) - Kitchen sink build image equivalent to `informaticsmatters/rdkit-build-debian`.
2325
* [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.
2426
* [informaticsmatters/rdkit-java-centos](https://hub.docker.com/r/informaticsmatters/rdkit-java-centos/) - a Centos based distribution designed for running RDKit from Java.
2527

28+
Note: we primarily focus on the Debian based images. Other platforms are not so well maintained.
29+
2630
## Branches
2731

2832
* `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
8084

8185
## Build and run
8286

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`.
8692

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.
8997

90-
Push the images to Docker Hub like this:
91-
92-
`./push.sh`
9398

9499
Run the Python image like this:
95100

96-
`docker run -it --rm informaticsmatters/rdkit-python-debian:<tag_name> python`
101+
`docker run -it --rm informaticsmatters/rdkit-python3-debian:<tag_name> python`
97102

98103
Run the Java image like this:
99104

@@ -123,7 +128,7 @@ Javadocs are built into `/rdkit/Code/JavaWrappers/gmwrapper/doc`. Since the 2019
123128
## RDBASE environment variable
124129

125130
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
127132
suffer this problem and to fix it you must define the RDBASE environment variable when you run the container and set it
128133
to a value of `/usr/share/RDKit`. e.g. `docker run -it -e RDBASE=/usr/share/RDKit ...`
129134

@@ -140,11 +145,12 @@ images from 2019 onwards are built with Java 11.
140145

141146
## RDKit cartridge
142147

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
149+
`informaticsmatters/rdkit-cartridge-debian` images.
144150
This started with the `Release_2018_09` images.
145151

146-
If you want to use the cartridge in the `informaticsmatters/rdkit-cartridge-debian:latest` image then try something like this.
147-
152+
If you want to use the cartridge in the `informaticsmatters/rdkit-cartridge-debian:latest` image then try something
153+
like this:
148154

149155
```
150156
# start the container

0 commit comments

Comments
 (0)