[root@fieldyang01 data]# docker run -it --name=gogs -p 3022:22 -p 3000:3000 -v /root/yangzw/docker/gogs/data:/data gogs/gogs
Unable to find image 'gogs/gogs:latest' locally
Trying to pull repository docker.io/gogs/gogs ...
latest: Pulling from docker.io/gogs/gogs
4167d3e14976: Already exists
704e829dff56: Pull complete
5587acc07e36: Pull complete
601ee68e0a52: Pull complete
bf08e966ad0d: Pull complete
e7b15b521d7a: Pull complete
fb4923e8a346: Pull complete
ff67ac8dc117: Pull complete
Digest: sha256:11881ec83a493019abcec7db21a12e1bcce19cdc04f2efd04170f1a3a2815c91
Status: Downloaded newer image for docker.io/gogs/gogs:latest
usermod: no changes
Mar 11 14:39:54 syslogd started: BusyBox v1.30.1
Mar 11 14:39:55 sshd[36]: Server listening on :: port 22.
Mar 11 14:39:55 sshd[36]: Server listening on 0.0.0.0 port 22.
2020/03/11 14:39:57 [ WARN] Custom config "/data/gogs/conf/app.ini" not found. Ignore this warning if you're running for the first time
2020/03/11 14:39:57 [TRACE] Log mode: Console (Trace)
2020/03/11 14:39:57 [ INFO] Gogs 0.12.0+dev
2020/03/11 14:39:57 [TRACE] Work directory: /app/gogs
2020/03/11 14:39:57 [TRACE] Custom path: /data/gogs
2020/03/11 14:39:57 [TRACE] Custom config: /data/gogs/conf/app.ini
2020/03/11 14:39:57 [TRACE] Log path: /app/gogs/log
2020/03/11 14:39:57 [TRACE] Build time: 2020-03-10 07:07:54 UTC
2020/03/11 14:39:57 [TRACE] Build commit: 434f1ec542cc6dab6b2709e3a6fab261bdad4c7b
2020/03/11 14:39:57 [ INFO] SQLite3 is supported
2020/03/11 14:39:57 [ INFO] Run mode: Development
2020/03/11 14:39:57 [ INFO] Listen on http://0.0.0.0:3000
[root@fieldyang01 nginx]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f2bbb060b89e gogs/gogs "/app/gogs/docker/..." 48 seconds ago Up 47 seconds 0.0.0.0:3000->3000/tcp, 0.0.0.0:3022->22/tcp gogs
6ffb685c8e91 mysql:5.6 "docker-entrypoint..." 46 hours ago Up 46 hours 3306/tcp db01
aa658f0d7269 centos:6.8 "/bin/bash" 4 days ago Exited (255) 3 days ago centos
f21ba87f00f9 ubuntu:14.04 "/bin/bash" 4 days ago Exited (0) 4 days ago ubuntu
[root@fieldyang01 nginx]# docker exec -it f2bbb060b89e sh
/app/gogs # ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:AC:11:00:02
&n
Docker简单搭建gos
最新推荐文章于 2024-04-16 13:22:39 发布
本文档记录了如何使用Docker快速部署Gogs服务。通过`docker run`命令,将Gogs容器与宿主机端口映射,并挂载数据卷持久化数据。在启动过程中遇到的问题以及Gogs的日志输出也一并展示。

最低0.47元/天 解锁文章
4664

被折叠的 条评论
为什么被折叠?



