Reducing Opentext Documentum 20.2 Docker image size

The Docker image size provided by Opentext for the Content Server is a ~3.5GB tar file:

[dmadmin@dctm202 ~]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
contentserver/centos/stateless/cs 20.2.0000.0110 f83cfb099daf 3 weeks ago 3.48GB

But if you run the image, you’ll see that the actual size of the container is ~2.6GB.

This difference comes from the intermediate layers stored on the original image. If you want to have a smaller image, you could export the container to a .tar file, but if you do this, you will lose all the default configurations required for running the container (ports exposed, entry point, etc.). But there’s a workaround to get a working trimmed image:

docker run -it --entrypoint /bin/bash contentserver/centos/stateless/cs:20.2.0000.0110
  • You can be as “aggressive” as you want removing unused stuff. You can skip this point, but I would at least delete all .dll files and aix/hpux/sol/win folders from com.emc.ide.external.dfc_1.0.0/dmbasic on Composer’s plugin folder, as those don’t make sense on a Linux image.
  • Run the docker rebase script:
./docker-rebase <CONTAINER_ID> contentserver/centos/stateless/cs:20.2.4
  • Export the generated image:
docker save contentserver/centos/stateless/cs:20.2.4 > cs202clean.tar

Now, you’ll have the following:

[dmadmin@dctm202 Scripts]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
contentserver/centos/stateless/cs 20.2.4 5336da9204b0 34 minutes ago 2.49GB

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.