jtesta / ssh-audit

SSH server & client security auditing (banner, key exchange, encryption, mac, compression, compatibility, security, etc)
MIT License
3.42k stars 177 forks source link

Add cleanup for apt cache files #215

Closed shot4free closed 1 year ago

shot4free commented 1 year ago

Adding this step decreases the size of the image.

ssh-audit-new latest 0c391ba567ee 39 minutes ago 157MB ssh-audit-old latest a425e0043125 40 minutes ago 176MB

jtesta commented 1 year ago

@shot4free : Thanks for the PR! Unfortunately, it introduces a syntax error. It seems like the patch is missing && before the rm command:

$ make -f Makefile.docker 
[...]
Step 3/9 : RUN apt clean && apt update && apt -y dist-upgrade && apt clean rm -rf /var/lib/apt/lists/*
 ---> Running in f83aacb5ee5f
[...]
E: Command line option 'r' [from -rf] is not understood in combination with the other options.
The command '/bin/sh -c apt clean && apt update && apt -y dist-upgrade && apt clean rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
make: *** [Makefile.docker:7: all] Error 100

Once this is fixed, though, I'd be happy to merge it!

shot4free commented 1 year ago

@shot4free : Thanks for the PR! Unfortunately, it introduces a syntax error. It seems like the patch is missing && before the rm command:

$ make -f Makefile.docker 
[...]
Step 3/9 : RUN apt clean && apt update && apt -y dist-upgrade && apt clean rm -rf /var/lib/apt/lists/*
 ---> Running in f83aacb5ee5f
[...]
E: Command line option 'r' [from -rf] is not understood in combination with the other options.
The command '/bin/sh -c apt clean && apt update && apt -y dist-upgrade && apt clean rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
make: *** [Makefile.docker:7: all] Error 100

Once this is fixed, though, I'd be happy to merge it!

Yes, you are right. Forgot about "&&". Not it is fixed.

jtesta commented 1 year ago

Merged. Thanks!!