Open kcq opened 4 months ago
Appreciate the reply :)
# the primary command
CMD [ "--help" ]
# our entrypoint
ENTRYPOINT [ "/myffmpeg" ]
I figured I'd need to include those binaries as they are in use with the /myffmpeg
script. Here is the public container: https://hub.docker.com/r/kevinpirnie/ffmpeg
and just in case, I attached a zip of the "project" as well :)
Tried slimming, by using this command: slim build --include-new false --include-path /usr/local/bin --include-path /usr/local/etc --include-path /usr/local/lib --include-path /usr/local/share/vulkan --include-path /usr/share/fonts --include-path /usr/share/libdrm --include-path /etc/OpenCL/vendors --include-bin /usr/bin/stat --include-bin /usr/sbin/groupadd --include-bin /usr/sbin/groupmod --include-bin /usr/sbin/usermod --include-bin /usr/bin/find --include-bin /usr/bin/grep --include-bin /usr/bin/id --include-bin /usr/bin/cut --include-bin /usr/bin/getent --include-bin /usr/bin/echo --include-bin /usr/bin/chmod --continue-after 1 --http-probe-off --tag kp/ffmpeg:slim --target kp/ffmpeg:latest
, and same. "Slim'd" container ends up being ~900M
I am going to try using the Dockerfile instead of the --target
and see what happens.
Tried it by letting slim
build the images based on the Dockerfile with:
slim build --include-new=false --include-path /usr/local/bin --include-path /usr/local/etc --include-path /usr/local/lib --include-path /usr/local/share/vulkan --include-path /usr/share/fonts --include-path /usr/share/libdrm --include-path /etc/OpenCL/vendors --include-bin /usr/bin/stat --include-bin /usr/sbin/groupadd --include-bin /usr/sbin/groupmod --include-bin /usr/sbin/usermod --include-bin /usr/bin/find --include-bin /usr/bin/grep --include-bin /usr/bin/id --include-bin /usr/bin/cut --include-bin /usr/bin/getent --include-bin /usr/bin/echo --include-bin /usr/bin/chmod --continue-after 1 --http-probe-off --tag kp/ffmpeg:slim --dockerfile Dockerfile .
Results are:
User Report in Discord (Kevin)
Attempting to build a ffmpeg container. Original is 672M, when I attempt to slim it without adding in the necessary includes, the container shrinks down to ~125M, however, it doesnt contain the necessary includes so it does not work. I have come up with the following: slim build --include-path /usr/local/bin --include-path /usr/local/etc --include-path /usr/local/lib --include-path /usr/local/share/vulkan --include-path /usr/share/fonts --include-path /usr/share/libdrm --include-path /etc/OpenCL/vendors --include-bin /usr/bin/stat --include-bin /usr/sbin/groupadd --include-bin /usr/sbin/groupmod --include-bin /usr/sbin/usermod --include-bin /usr/bin/find --include-bin /usr/bin/grep --include-bin /usr/bin/id --include-bin /usr/bin/cut --include-bin /usr/bin/getent --include-bin /usr/bin/echo --include-bin /usr/bin/chmod --continue-after 1 --http-probe-off --tag kp/ffmpeg:slim --target kp/ffmpeg:latest which includes everything needed for it to work, and it does indeed work.
However, the container grows to 997M instead of shrinking.
What am I doing wrong? the include paths and files total around the difference between the 2 containers...