dperson / torproxy

GNU Affero General Public License v3.0
514 stars 144 forks source link

FIX error when doing sed on non existing privoxy config file #64

Open pubkey opened 3 years ago

pubkey commented 3 years ago

When doing a full build from the Dockerfile in the repo, I got this error because the RUN command tries to run sed on a file that does not exist. error

This commit ensures that the privoxy config file exists, before working with it.

skobkin commented 2 years ago

Are you sure that this is a fix?

Because you'll get an empty config for privoxy this way. It fixes the build itself, but breaks the behavior of the original image.

pubkey commented 2 years ago

It works for me at least. I mean, without the fix it does not even start up. With the fix, it creates the file, and it still runs the following sed commands to fill it.

skobkin commented 2 years ago

With the fix, it creates the file, and it still runs the following sed commands to fill it.

They're not filling the file. Did you check it's content after the build?

/ # du -sh /etc/privoxy/config
0       /etc/privoxy/config
/ # cat /etc/privoxy/config | wc -m
0