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.
docker squid---but git proxy should specify by git config --global http.proxy http:...的更多相关文章
- 解决Failed with error: unable to access 'https://git.coding.net/chenmi1234/lianpos.git/': Couldn't resolve host 'git.coding.net'
代码改变世界 github push 出现问题 Failed with error: unable to access 'https://git.coding.net/chenmi1234/lianp ...
- [Jenkins][git]构建时提示Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git reset --hard" returned status code 128:
--------------------- 如需转载,转载请注明出处. --------------------- 今日发现所有IOS构建相关的job全部失败,并提示如下错误: ERROR: Erro ...
- 使用GIT进行源码管理——GIT托管服务2018
我曾经介绍过几个在线的GIT托管服务,然而时过境迁,发生了不少变化,便写了此文章,在新的一年重新更新一下: 国外托管网站: 国外托管网站比起国内的来相对靠谱点,但一个主要缺点是网速较慢,并且可能在 ...
- Git初探--笔记整理和Git命令详解
几个重要的概念 首先先明确几个概念: WorkPlace : 工作区 Index: 暂存区 Repository: 本地仓库/版本库 Remote: 远程仓库 当在Remote(如Github)上面c ...
- CentOS7 编译安装 Git 服务器 Centos 7.0 + Git 2.2.0 + gitosis (实测 笔记)
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 服务器IP:192.168.1.31 域 ...
- 版本管理之Git(二):Win7上Git安装及简单配置过程
一.安装包 msysgit(Windows版本的Git) 下载地址:http://code.google.com/p/msysgit/downloads/list?q=full+installer+o ...
- 【Git学习笔记】初始化Git仓库和版本回退
学习地址 http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000 什么是版本库呢?版本库又 ...
- git的使用,通过git上传修改工程
一:下载git,https://git-scm.com/downloads(若下载速度慢,可下载百度下的)接下来,默认配置,一直next 二:在github上注册账号,并新建一个项目test(英文有点 ...
- Git学习(一)——Git介绍与安装
一.Git诞生 Linus在1991年创建了Linux,从此,Linux系统不断发展,成为最大的服务器系统软件. 2005年,Linus用C编写了一个分布式版本控制工具--Git. 二.集中式vs分布 ...
随机推荐
- coalesce
coalesce我理解就是将多个partition合并成少量的partition. data.coalesce(2,true) 第一个参数是partition数量 第二个参数是合并是是否进行shuff ...
- 初始化lpc2106开发工程
单片机型号:lpc2106.Init.s:初始化pc指针和sp指针. AREA Init, CODE, READONLY IMPORT test1_main EXPORT ...
- BZOJ3630 : [JLOI2014]镜面通道
从左边不能到达右边当且仅当存在一条与上下底边相连的分割线将它们分开 设下底边为S,上底边为T,每个元件作为点,有公共部分的两个点互相连边 最后拆点求最小割 #include<cstdio> ...
- System call in linux by C
1: #include <stdlib.h> 2: int system(const char *command); 3: 4: while (something) { 5: int r ...
- 使用X-UA-Compatible来设置IE8/IE9兼容模式
文件兼容性用于定义让IE如何编译你的网页.此文件解释文件兼容性,如何指定你网站的文件兼容性模式以及如何判断一个网页该使用的文件模式. 前言 为了帮助确保你的网页在所有未来的IE版本都有一致的外观,IE ...
- MONO 安装 分析
你是安装在/etc下的吧? 5.2是没有serverbusy的提示的,那时,它就傻等,给人造成down的假像.而现在的版本,会提示的. 你升级时,upgrade后边加参数了吗? 加了 /etc/jw ...
- oracle系列--第四篇 Oracle的卸载
对于oracle的卸载,是一件相对麻烦的事情,不像其他软件那样,我们可以根据卸载向导,就可以方便快捷地卸载软件. oracle的卸载,我们要涉及到修改注册表,重启计算机等操作. 我们有些时候有必要卸载 ...
- 如何在spring框架中解决多数据源的问题
在我们的项目中遇到这样一个问题:我们的项目需要连接多个数据库,而且不同的客户在每次访问中根据需要会去访问不同的数据库.我们以往在spring和hibernate框架中总是配置一个数据源,因而sessi ...
- 去掉Xcode源码末尾的空格
去掉Xcode源码末尾的空格 在用 Xcode 开发的时候,很容易就在行末增加一些空格了.这些空格在上传到 review board 上后 , 就会被特别的颜色显示出来.因为一种好的编程风格是说 , ...
- 分支语句:if
(1)分支语句if: if(判断条件) { 满足条件要执行的语句(若满足则alert输出(“”)) } else { 不满足条件时执行的语句 } (若if满足,else绝对不走,反之,走else) 例 ...