Great tool, guys!
I just need a pointer on my output.
My image contains custom headless chrome(CEF), docker-slim minifies it well, but I run my container it crashes after sometime when I access my container with the following error:
[0100/000000.789662:ERROR:zygote_linux.cc(614)] Zygote could not fork: process_type renderer numfds 5 child_pid -1
[0100/000000.791877:ERROR:zygote_linux.cc(646)] write: Broken pipe (32)
/opt/distrib/init.sh: line 10: 10 Trace/breakpoint trap (core dumped) $PWD/my_browser --no-sandbox --disable-gpu --disable-gpu-compositing
docker-slim build always fails with any of the Go samples untouched. Fwiw, it also fails with my own container ;-)
info=container status=created name=dockerslimk_51426_20191211150105 id=585c79c09a5481a7967948391876a49f67e251f6ee19e618f72ab0fa6e649f01 docker-slim[build]: info=container status=crashed id=585c79c09a5481a7967948391876a49f67e251f6ee19e618f72ab0fa6e649f01 docker-slim: container stdout: docker-slim: container stderr: standard_init_linux.go:211: exec user process caused "exec format error"
I'm on OSX (10.13.6 (17G10021)) with Docker 19.03.5.
file docker-slim-sensorin that directory to see the system architecture for the sensor executable. Can you also share the output when you run
registry.weihong.com.cnis referenced in your Dockerfile somehow, right? If this is the case it's a gap in functionality right now... The
--etc-hosts-mapvalue is only applied at runtime when the image is minified (it's not used when the image is build like it would happen with
docker build --add-host. I'll open a Github issue to track this enhancement. Thank you for sharing your use case!
docker-slimcommand line when you are trying to use the
--include-pathparameter? It'll help reproducing the condition.
docker-slimis technically possible, but it requires extra effort and you need to use the
docker-slimto specify explicitly what you want to keep. There's a future enhancement that will help with minifying base images (ability to minify images specifying multiple command line applications you want to keep). I'll be happy to ping you when it's available and it'll be super if you have cycles to work on this feature if you'd like to see it sooner :)