Unable to build h4h5tools v. 2.2.4 from source in Ubuntu 18.04 LTS (Docker image)

I am having problems with building h4h5tools v. 2.2.4 from source in an Ubuntu 18.04 LTS (in a Docker image). I have managed to first build and install HDF4 (4.2.13, /usr/local/hdf4) and HDF5 (5-1.8.21, /usr/local/hdf5), and managed to pass the configure and make steps for h4h5tools using

/path/to/h4h5tools-2.2.4# export CC=/usr/local/hdf4/bin/h4cc
/path/to/h4h5tools-2.2.4# ./configure --prefix=/usr/local/h4h5tools --with-hdf5=/usr/local/hdf5 && make

But make check fails

/path/to/h4h5tools-2.2.4# make check
Making check in lib
make[1]: Entering directory '/path/to/h4h5tools-2.2.4/lib'
Making check in src
make[2]: Entering directory '/path/to/h4h5tools-2.2.4/lib/src'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/path/to/h4h5tools-2.2.4/lib/src'
Making check in test
make[2]: Entering directory '/path/to/h4h5tools-2.2.4/lib/test'
make  testh4toh5.sh
make[3]: Entering directory '/path/to/h4h5tools-2.2.4/lib/test'
make[3]: 'testh4toh5.sh' is up to date.
make[3]: Leaving directory '/path/to/h4h5tools-2.2.4/lib/test'
Testing h4h5apitestdefault                                            h5diff: <../testfiles/Results/vg_all_test.h5>: unable to open file
*FAILED*
Testing h4h5apitestname                                               h5diff: <../testfiles/Results/vg_all_testname.h5>: unable to open file
*FAILED*
Testing h4h5apitestsds                                                h5diff: <../testfiles/Results/sds_lib_test.h5>: unable to open file
*FAILED*
Testing h4h5apitestimage                                              h5diff: <../testfiles/Results/image_lib_test.h5>: unable to open file
*FAILED*
Testing h4h5apitestvdata                                              h5diff: <../testfiles/Results/vdata_lib_test.h5>: unable to open file
*FAILED*
Testing h4h5apitestimageattr                                          h5diff: <../testfiles/Results/image_lib_testattr.h5>: unable to open file
*FAILED*
Testing h4h5apitestsdsattr                                            h5diff: <../testfiles/Results/sds_lib_testattr.h5>: unable to open file
*FAILED*
Testing h4h5apitestbasvgroup                                          h5diff: <../testfiles/Results/vg_bas_test.h5>: unable to open file
*FAILED*
Testing h4h5apitestadvgroup                                           h5diff: <../testfiles/Results/testallvgroup.h5>: unable to open file
*FAILED*
Testing h4h5apitestloneimage                                          h5diff: <../testfiles/Results/image_lib_lonetest.h5>: unable to open file
*FAILED*
Testing h4h5apitestlonesds                                            h5diff: <../testfiles/Results/sds_lib_lonetest.h5>: unable to open file
*FAILED*
Testing h4h5apitestlonevdata                                          h5diff: <../testfiles/Results/vdata_lib_lonetest.h5>: unable to open file
*FAILED*
Makefile:707: recipe for target 'check' failed
make[2]: *** [check] Error 12
make[2]: Leaving directory '/path/to/h4h5tools-2.2.4/lib/test'
Makefile:345: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/path/to/h4h5tools-2.2.4/lib'
Makefile:396: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1