Skip to content

Add squid to $PATH and add squid to CMD #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ RUN /apps/squid/sbin/squid -N -f /apps/squid.conf.cache -z
RUN chown -R nobody:nogroup /apps/
RUN chgrp -R 0 /apps && chmod -R g=u /apps

ENV PATH=/apps/squid/sbin:${PATH}
ENV CONF=/apps/squid.conf.forward

EXPOSE 3128
#CMD ["/usr/bin/supervisord"]

CMD squid -NsY -f "${CONF}"
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ To run the image, simply invoke a shell in the container and start squid in the
are interested in:


```bash
Copy link
Owner

Choose a reason for hiding this comment

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

suggest a table with all the config values

To run the image, either specify the configuration you need or run in an interactive shell

Configuration File Description
squid.conf.forward explicit forward proxy mode intercepts HTTP traffic and uses CONNECT for https. (default)
squid.conf.cache squid proxy which will cache upstream content
squid.conf.https_port forward proxy with HTTPS listener for squid
squid.conf.basicauth enable basic authentication with username/password
squid.conf.allow_domain forward proxy that allows access to specific domain
squid.conf.intercept intercept and inspect SSL Traffic
# detached background run (uses squid.conf.forward)
docker run -d -p 3128:3128 docker.io/salrashid123/squidproxy

# alternative configuration file
docker run -it -p 3128:3128 -e CONF=squid.conf.intercept docker.io/salrashid123/squidproxy
# interactive
docker run -it -p 3128:3128 docker.io/salrashid123/squidproxy /bin/bash

# detached background run
docker run -d -p 3128:3128 docker.io/salrashid123/squidproxy

# alternative configuration file
docker run -it -p 3128:3128 -e CONF=squid.conf.intercept docker.io/salrashid123/squidproxy
```
docker run -p 3128:3128 -ti docker.io/salrashid123/squidproxy /bin/bash

```bash
# interactive
docker run -it -p 3128:3128 docker.io/salrashid123/squidproxy /bin/bash
```

Also see
Expand Down