zoukankan      html  css  js  c++  java
  • docker squid---but git proxy should specify by git config --global http.proxy http:...

    Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.

    http://www.cnblogs.com/mchina/p/3812190.html

    https://hub.docker.com/r/sameersbn/squid/

     https://github.com/sameersbn/docker-squid

    docker pull sameersbn/squid:3.3.8-14

    docker run --name squid -d --restart=always   --publish 3128:3128   --volume /srv/docker/squid/cache:/var/spool/squid3   sameersbn/squid:3.3.8-14

    Configuration

    Squid is a full featured caching proxy server and a large number of configuration parameters. To configure Squid as per your requirements edit the default squid.conf and volume mount it at/etc/squid3/squid.conf.

    docker run --name squid -d --restart=always 
      --publish 3128:3128 
      --volume /path/to/squid.conf:/etc/squid3/squid.conf 
      --volume /srv/docker/squid/cache:/var/spool/squid3 
      sameersbn/squid:3.3.8-14
    

    To reload the Squid configuration on a running instance you can send the HUP signal to the container.

    docker kill -s HUP squid
    

    Usage

    Configure your web browser network/connection settings to use the proxy server which is available at172.17.42.1:3128

    If you are using Linux then you can also add the following lines to your .bashrc file allowing command line applications to use the proxy server for outgoing connections.

    export ftp_proxy=http://172.17.42.1:3128
    export http_proxy=http://172.17.42.1:3128
    export https_proxy=http://172.17.42.1:3128
    

    To use Squid in your Docker containers add the following line to your Dockerfile.

    ENV http_proxy=http://172.17.42.1:3128 
        https_proxy=http://172.17.42.1:3128 
        ftp_proxy=http://172.17.42.1:3128
    

    Logs

    To access the Squid logs, located at /var/log/squid3/, you can use docker exec. For example, if you want to tail the access logs:

    docker exec -it squid tail -f /var/log/squid3/access.log
    

    You can also mount a volume at /var/log/squid3/ so that the logs are directly accessible on the host.

  • 相关阅读:
    some Rails leanrning:Rails Ajax,Validates,Cycle
    快速排序与挑白菜
    九月开学
    搜索引擎代码资源
    start RubyOnRails
    垂直搜索引擎之我见
    demo下载:ASP.NET GDI+生成动态的Gif动画
    NHibernate和ADO.Net的性能对比相差有多大?
    手工调试自定义控件各主要方法执行顺序(分运行时和设计时)
    ASP.Net中的缓存方案(不仅仅是Cache和Session)(我在CSDN上和别人的争论)
  • 原文地址:https://www.cnblogs.com/SZLLQ2000/p/5522454.html
Copyright © 2011-2022 走看看