Closed missinglink closed 1 year ago
The following command helps reduce the image size significantly:
# https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/28
RUN rm -rf \
node_modules/aws-lambda-ric/deps/curl-*/autom4te.cache \
node_modules/aws-lambda-ric/deps/curl-*/config.log \
node_modules/aws-lambda-ric/deps/curl-*/configure \
node_modules/aws-lambda-ric/deps/curl-*/docs \
node_modules/aws-lambda-ric/deps/curl-*/projects \
node_modules/aws-lambda-ric/deps/curl-*/tests \
node_modules/aws-lambda-ric/deps/curl-*/README
33M /code/node_modules/aws-lambda-ric/deps/curl-7.77.0
This one seems pretty bonkers... Could it not just use a pre-installed libcurl and fail if its not available?
Heya,
I've been looking at reducing the size of images generated with this lib and found that
105M
of the total323M
image size is being taken up by thecurl-7.77.0
directory:Within that dir there seem to be a bunch of files not required at runtime:
I'm assuming it's not safe to just delete
/code/node_modules/aws-lambda-ric/deps/curl-7.77.0
? ... but presumably we could ditch some dirs such ascurl-7.77.0/tests
and the cache/log/configure/docs etc. files?