惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - JackieHan

ubuntu i3 xterm中文输入显示问题解决 ubuntu vim markdown 实时预览 ubuntu docker方式部署docker registry v2 ubuntu14.04 server 安装docker Ubuntu Tomcat Ubuntu ssh 代理 全网访问速度优化 git 操作 vim使用指北 ---- Multiple Windows in Vim vim使用指北 ---- Advanced Editing vim使用指北 ---- Global Replacement vi/vim使用指北 ---- Introducting the ex Editor ubuntu 点点滴滴 vi/vim使用指北 ---- Learning the vi and Vim Editors 读书 笔记 vi/vim使用指北 ---- Beyond the Basic vi/vim使用指北 ---- Moving Around in a Hurry vi/vim使用指北 ---- Sample Editing linux权威指南 简记 idea 使用
docker 安装 gogs(go git server) 及问题解决
JackieHan · 2016-03-02 · via 博客园 - JackieHan

2016-03-02 10:20  JackieHan  阅读(2927)  评论()    收藏  举报

docker安装gogs

参考官方说明

gogs mysql 支持

运行一个mysql image

docker run --name gogs-mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:tag

运行gogs image 连接上面的mysql

docker run --name=gogs -p 10022:22 -p 10080:3000 -v /var/gogs:/data --link gogs-mysql:mysql gogs/gogs

配置mysql

注意mysql host 为mysql:3306(启动gogs image连接的mysql) 密码为123456(启动mysql image 指定的密码)

gogs的仓库ssh/http路径配置

配置路径所在位置

{gogs docker 启动挂在路径}/gogs/conf/app.ini

配置项

DOMAIN       =  xxxx   影响ssh路径
ROOT_URL     = http://docker.host:10080/  影响http路径

gogs ssh 克隆需要密码

docker gogs的ssh的端口号22映射到docker主机的10022端口,所以ssh git@dockerhost会提示输入密码

解决方法:在当前用户目录的.ssh目录下,建立config文件,

Host gogs.dev 
HostName gogs.dev
Port 10022
User git

说明:Host:指定gogs的host(不要和docker host的名字一样,要不ssh dockerhost又有问题了);Host Name:好像没啥用;Port:为gogs的ssh映射后的端口;User:gogs运行用户

然后再ssh git@gogs.dev就会出现git shell的提示,这样就可以用ssh的方式克隆gogs上的git仓库了