Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile issues #3

Open
GitMensch opened this issue Sep 3, 2021 · 1 comment
Open

Dockerfile issues #3

GitMensch opened this issue Sep 3, 2021 · 1 comment

Comments

@GitMensch
Copy link

GitMensch commented Sep 3, 2021

You very likely want to get the release from its official source: https://ftp.gnu.org/gnu/gnucobol/?C=M;O=D.

As you explicit disable the BDB library (--without-db, otherwise that would have been used for ORGANIZATION INDEXED) you don't need to include libdb-dev in your yum.
As this dockerfile is intended for (micro)servicing, you very likely don't need any screenio, so you can remove libncurses5-dev, too, and as best-practice also make this explicit with --without-curses).

Checking the build logs there's currently an output:

No package libdb-dev available.
No package libncurses5-dev available.
No package libgmp-dev available.

So it is reasonable to drop those in any case.

If I understand the issues with newer GnuCOBOL versions correctly, then this is an issue of additional dependencies (nothing is hardwired BTW ;-) - you can disable them similar with --without-xml (otherwise you'd need libxml2-dev, and that's a relative big package - but possible useful for services) and --without-json (again, likely a reasonable thing to have for a service). But at least for JSON you may use a different approach (the common default is libjsonc, quite small), as there's a two-file replacement available which would lead to a static linked cJSON within libcob: just download cJSON.c and cJSON.h into the "lib" folder before running configure and it will be integrated, no additional runtime-libraries needed (it could not harm to then make that explicit by using --with-json=local).

It would be reasonable to either also copy the translation files or disable gettext by --disable-nls. Currently the container has gettext (additional runtime dependency) without any use at run-time (only when compiling with cobc).

... and finally the dockerfile should not need autoconf (which then removes the additional dependencies perl [with a bunch f extra dependencies] and m4) - removing the additional dependencies will make the container smaller, which should also be useful for the starting time (and on the way you could upgrade to the newest GC version, too).

You may want to additionally copy cobcrun into /app (or, if you create it /app/bin, allowing to run modules (compiled without -x), too,

And possibly you want to get in contact with the repo team of amazonlinux to include GnuCOBOL directly there (it is available in the EPEL repos, so there'd be a nearly finished starting point, too). Using that will then likely lead to a bigger dependency list and size (including libxml2 and libjsonc) but a much faster setup.

@GitMensch
Copy link
Author

GitMensch commented Feb 14, 2024

Ping @didier-durand for any comments and a possible update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant