slimtoolkit / slim

Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
19.43k stars 728 forks source link

minified image falling with ModuleNotFoundError #224

Open slayer321 opened 3 years ago

slayer321 commented 3 years ago

Expected Behavior

I'm using this project and trying to minify the image and then run it . But when I'm changing the .slim image in the docker-compose file the project is falling with ModuleNotFoundError: No module named 'jinja2.ext' error.


Actual Behavior

The project works fine when I am not using the .slim image


Steps to Reproduce the Problem

1. change the normal image with `.slim` image in docker-compose file 2. Run docker-compose up 3. project is not running --- Specifications ================= - Version: 1.37.0 - Platform: Debian 5.10.46-4kali1
kcq commented 3 years ago

@slayer321 thank you for opening the issue and providing the project link! How did you slim your app image? Do you mind sharing the command line you used for docker-slim build?

slayer321 commented 3 years ago

The project I mention has the docker-compose and I'm using the image name teamcloudyuga/rsvpapp:mooc in it

When I run this docker-slim command

docker-slim build --target teamcloudyuga/rsvpapp --http-probe=false

I'm getting teamcloudyuga/rsvpapp.slim:latest image and when it is added in docker-compose the project is falling with ModuleNotFoundError .

docker-slim works with docker-compose right?