« Previous  |  Next »

Minimizing Docker Pharo - Plugins

30 November 2019

In the quest^Wrather leisurely ambulation towards the smallest possible Docker image for Pharo for running headless, batch and server-side applications, one approach is to reduce the size of the Pharo VM, by removing irrelevant built-in and external plugins, also known as modules.

Here's what a pharo.cog.spur.minheadless VM built yesterday produces from STON toStringPretty: Smalltalk vm listBuiltinModules:

'[
    ''SqueakFFIPrims'',
    ''IA32ABI VMMaker.oscog-eem.2480 (i)'',
    ''FilePlugin VMMaker.oscog-eem.2530 (i)'',
    ''FileAttributesPlugin FileAttributesPlugin.oscog-eem.50 (i)'',
    ''LargeIntegers v2.0 VMMaker.oscog-eem.2530 (i)'',
    ''LocalePlugin VMMaker.oscog-eem.2495 (i)'',
    ''MiscPrimitivePlugin VMMaker.oscog-eem.2480 (i)'',
    ''SecurityPlugin VMMaker.oscog-eem.2480 (i)'',
    ''SocketPlugin VMMaker.oscog-eem.2568 (i)'',
    ''B2DPlugin VMMaker.oscog-eem.2536 (i)'',
    ''BitBltPlugin VMMaker.oscog-nice.2587 (i)'',
    ''FloatArrayPlugin VMMaker.oscog-eem.2480 (i)'',
    ''FloatMathPlugin VMMaker.oscog-eem.2480 (i)'',
    ''Matrix2x3Plugin VMMaker.oscog-eem.2480 (i)'',
    ''DropPlugin VMMaker.oscog-eem.2480 (i)'',
    ''ZipPlugin VMMaker.oscog-eem.2480 (i)'',
    ''ADPCMCodecPlugin VMMaker.oscog-eem.2480 (i)'',
    ''AsynchFilePlugin VMMaker.oscog-eem.2493 (i)'',
    ''BMPReadWriterPlugin VMMaker.oscog-eem.2480 (i)'',
    ''DSAPrims CryptographyPlugins-eem.14 (i)'',
    ''FFTPlugin VMMaker.oscog-eem.2480 (i)'',
    ''FileCopyPlugin VMMaker.oscog-eem.2493 (i)'',
    ''JoystickTabletPlugin VMMaker.oscog-eem.2493 (i)'',
    ''MIDIPlugin VMMaker.oscog-eem.2493 (i)'',
    ''SerialPlugin VMMaker.oscog-eem.2493 (i)'',
    ''SoundCodecPrims VMMaker.oscog-eem.2480 (i)'',
    ''SoundGenerationPlugin VMMaker.oscog-eem.2480 (i)'',
    ''StarSqueakPlugin VMMaker.oscog-eem.2480 (i)'',
    ''Mpeg3Plugin VMMaker.oscog-eem.2495 (i)'',
    ''VMProfileLinuxSupportPlugin VMMaker.oscog-eem.2480 (i)'',
    ''UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-dtl.66 (i)''
]'

And here's the directory listing of the VM as built:

~/src/opensmalltalk-vm/products/ph64mincogspurlinuxht% ls
libAioPlugin.so*             libPharoVMCore.a             libSqueakSSL.so*             libssh2.so@
libCroquetPlugin.so*         libRePlugin.so*              libSurfacePlugin.so*         libssh2.so.1@
libEventsHandlerPlugin.so*   libSDL2-2.0.so.0@            libcrypto.so.1.1*            libssh2.so.1.0.1*
libInternetConfigPlugin.so*  libSDL2-2.0.so.0.7.0*        libgit2.so@                  libssl.so@
libJPEGReadWriter2Plugin.so* libSDL2.so@                  libgit2.so.0.26.8*           libssl.so.1.1*
libJPEGReaderPlugin.so*      libSDL2DisplayPlugin.so*     libgit2.so.26@               pharo*

For server-side applications, a number of the plugins and shared libraries (certainly also libPharoVMCore.a) need not be part of the Docker image.

Blog comments powered by Disqus