diff --git a/Dockerfile b/Dockerfile index 1d59f7e..7702a52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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}" diff --git a/README.md b/README.md index 890c54b..782581a 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,17 @@ To run the image, simply invoke a shell in the container and start squid in the are interested in: +```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