minimal docker image with paraview

I was exploring add a simple paraview layer onto a docker (ubuntu) image using the laziest approach that I can think of, which is to simply copy and install the ParaView Linux binary into a container and then setup the PATH accordingly.

Of course a few extra libraries (GL, mesa etc) are missing and need to be added in. I think that I have the correct ones:

RUN  (cd /opt && tar -xf /tmp/${PARAVIEW_BINARY}.tar.gz); \
     rm -rf /tmp/${PARAVIEW_BINARY}*tar*;

# Minimum libraries to support ParaView binary
RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
    libgl1 libxcursor1 libxfixes3 libxrender1 \
 && rm -rf /var/lib/apt/lists/*

Either I’ve taken too much, or the tarfile is still in an intermediate layer or something else, but the final image much larger that I expected or desired: approx. 2.4GB

Any hints for creating a slimmer image?


That makes sense. The ParaView download is about 1.6G when extracted. I would make sure that the binary is actually deleted and that the apt cache is actually removed effectively.

Thanks Ben, nice to have some confirmation/hand-holding!