docker build \ --build-arg http_proxy=http://devnet-proxy.oa.com:8080 \ --build-arg https_proxy=http://devnet-proxy.oa.com:8080 \ --build-arg no_proxy=$no_proxy,9.134.240.218 \ -t "HUB_URL/SUB_FOLDER/SERVER_NAME:latest" .
docker build \ --build-arg http_proxy=http://devnet-proxy.oa.com:8080 \ --build-arg https_proxy=http://devnet-proxy.oa.com:8080 \ --build-arg no_proxy=$no_proxy,9.134.240.218 \ -t "HUB_URL/SUB_FOLDER/SERVER_NAME:latest" .
如果你是Linux 的老鸟了,那么你可以直接略过,Linux(Ubuntu)菜鸟可以一起看看,避免我踩过的坑。
在树莓派3B上安装Ubuntu Server 19.10,因为在Ubuntu18开始就是使用了Netplan工具来管理网络,说实话我之前一直没有用过这个工具,所以为了弄好这个我大致花了1.5个工作日才搞定固定IP地址的配置。在树莓派上的有线网卡(eth0)和无线网卡(wlan0)都配置了固定IP地址。
下面直接贴出我的配置文件内容,并加以了注释说明,重要的是看下我贴出的图片的效果,注意里面的绿色的英文,只有在正确的情况才会是这样,如果不是就表示你在某个地方错了。 浏览全部
树莓派上运行docker,自带tf卡性能太差,插了个usb的ssd上去,因此需要迁移docker的存储
service docker stop
此处有两种方法 方法一: rsync命令,同步文件,原文件夹保留
cd /opt mkdir docker rsync -aqxP /var/lib/docker/ /opt/docker/
方法二:mv命令
cd /var/lib/ mv docker /opt/
我使用的是mv命令。 浏览全部
1、我这里用的是mailu的邮局系统。有兴趣的朋友可以去它的github官方网址查看:https://github.com/Mailu/Mailu
2、用到的docker-compose配套的配置文件地址:https://github.com/scjtqs/docker-mail
3、这里用到了docker-compose工具,对于群晖之类的无法安装docker-compose的环境,我这里提供了docker版的docker-compose工具:https://hub.docker.com/r/scjtqs/docker-compose
1、具有固定ip的云服务器。
2、具备公网ip的家庭宽带
3、不具备公网ip的家庭宽带 浏览全部
前言:当我们在开发大的项目(几千人同时使用一个git仓库)的时候,可能经常会碰到这样的问题。
那么我们就需要一个方法来解决这种问题,不要遇到问题就删掉重来。。。
步骤:
1、切换到之前clone代码目录下,执行命令
git gc --prune=now
或者
git gc
2、再执行命令
git pull
3、有问题再执行后再做pull操作
git remote prune origin
首先,去 https://setup.mailu.io/ 获取你对应的docker-compose和 mailu.env
详细设置 在 https://mailu.io/1.7/compose/setup.html#tls-certificates
docker-compose.yml
in a project directory. First create your project directory.
mkdir /mailu
Then download the project file. A side configuration file makes it easier to read and check the configuration variables generated by the wizard.
cd /mailu
wget http://setup.mailu.io/1.7/file/xxxxxxxxxxxxxxxxxxxxxxxxxxx/docker-compose.yml
wget http://setup.mailu.io/1.7/file/xxxxxxxxxxxxxxxxxxxxxxxxxxx/mailu.env
up
command using -p mailu
flag for project name.
cd /mailu
docker-compose -p mailu up -d
Before you can use Mailu, you must create the primary administrator user account. This should be [email protected]. Use the following command, changing PASSWORD to your liking:
docker-compose -p mailu exec admin flask mailu admin admin 你的根域名 PASSWORD
Login to the admin interface to change the password for a safe one, at one of the hostnames 你的域名/admin. Also, choose the “Update password” option in the left menu.
volumes: - "./mailu/certs:/certs" - "./mailu/overrides/nginx:/overrides" - "./cetbot-dns-dnspod-credentials.ini:/etc/cetbot-dns-dnspod-credentials.ini"cetbot-dns-dnspod-credentials.ini中的配置信息:
certbot_dns_dnspod:dns_dnspod_email = "DNSPod 账户的 Email" certbot_dns_dnspod:dns_dnspod_api_token = "api_id,api_token"
由于某些原因,无法使用docker for win desktop,系统同样是win10,因此打上了wsl的主意。
我这边开发pc升级到win10 了。。监控软件(ioa) 不支持多网卡,用docker for win 会启用hyper-v ,会默认启动一个nat网卡,导致断网。。。。就研究了下wsl中跑docker
sudo apt-get install cgroupfs-mount sudo usermod -aG docker $USER
#可以直接用apt源的老版本。 sudo apt-get install docker.io #如果需要使用最新版本.使用如下代码 sudo apt-get remove docker docker-engine docker.io containerd runc curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
输入命令:
net use T: https://webdav地址 /user:用户名 /persistent:YES 密码
其中 T 为盘符(可自行修改) 在webdav地址,用户名,密码处填上自己的信息即可 浏览全部
方法源自docker 官方文档。可放心使用
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh