What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hey guys, we recently started to use B2B Frontend Image Optimization:
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?
Comments
-
@UTJU5PD6F Is there a way to use image optimization without installing gcc into docker/sdk images?
0 -
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/vendor0 -
@UTJU5PD6F So why does not it find precompiled sources? What’s a preconditions?
0 -
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.0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random