Hey guys, we recently started to use B2B Frontend ...
# docker
i
Hey guys, we recently started to use B2B Frontend Image Optimization: https://github.com/spryker-shop/b2b-demo-shop/blob/master/frontend/libs/images-optimization.js Since these modules depend on additional dependencies like a C-Compiler (make, autoconf, …) we had to extend the current cli container setup. https://github.com/spryker/docker-sdk/blob/master/images/common/cli/Dockerfile#L17   Is this on purpose not included out of the box or did we miss something here?
h
@freezing-kite-28997 Is there a way to use image optimization without installing gcc into docker/sdk images?
f
It's installation is first done by downloading precompiled sources from network and then fallback to compiling. So if the base image is not recognised you always need gcc to build it. This is an example of the list of supported platforms https://github.com/imagemin/mozjpeg-bin/tree/master/vendor
h
@freezing-kite-28997 So why does not it find precompiled sources? What’s a preconditions?
f
Could be many reasons - incompatible binary or detection mechanism is incorrect in docker lightweigt images. It uses some custom "BinWrapper" to determine which binary to use here https://github.com/imagemin/mozjpeg-bin/blob/ffd81a96301a6df3004c011c4f84b8a9fc63e620/lib/index.js#L8-L13 and then it tries to execute it to test here https://github.com/imagemin/mozjpeg-bin/blob/ffd81a96301a6df3004c011c4f84b8a9fc63e620/lib/install.js#L10-L12 And based on those 2 outcomes it decides to either use precompiled one or compile from sources. I would suggest to try and install in docker and check install logs to understand what step fails.