Skip to content

Conversation

@pubkey
Copy link

@pubkey pubkey commented Apr 23, 2021

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
Copy link

skobkin commented Dec 20, 2021

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
Copy link
Author

pubkey commented Dec 20, 2021

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
Copy link

skobkin commented Dec 20, 2021

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

Copy link

@skobkin skobkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably bring the old /etc/privoxy/config to the repository and add it using COPY. But you'll need to check that it works well first.

Currently the image will built successfully, but only Tor part of it will be working as intended. So there is no point in such changes, you can just use image which only contains Tor itself.

apk --no-cache --no-progress add bash curl privoxy shadow tini tor tzdata&&\
apk --no-cache --no-progress add bash curl privoxy shadow tini tor tzdata && \
file='/etc/privoxy/config' && \
touch $file && \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command just creates an empty file.

The following sed commands are doing nothing after that. So after this fix privoxy will not function as intended by the maintainer.

@SimonHaas
Copy link

Installing privoxy nowadays adds '.new' to its default config files under /etc/privoxy.

I maintain an up to date version under https://github.com/SimonHaas/torproxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants