Last active
July 16, 2018 02:46
-
-
Save novohool/0ae74f01db0a5699536d8ecb6e226de3 to your computer and use it in GitHub Desktop.
粗略的分享下创建一个公共web版的定时任务服务docker容器过程,
https://store.docker.com/community/images/jingslunt/webcron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
本地: | |
本地服务器安装docker服务,并使用国内镜像源【略】 | |
取官方镜像并启动 | |
docker run -it golang | |
进入镜像更新apt | |
apt-get update | |
安装 mysql及部署你的代码 | |
如果异常退出使用以下命令进入 | |
docker exec -it 容器id /bin/bash | |
提交容器为镜像 | |
docker commit 容器id jingslunt/webcron:lastest | |
远程: | |
注册并创建镜像 | |
注册地址:https://cloud.docker.com | |
我的镜像名 jingslunt/webcron | |
登陆docker | |
docker login hub.docker.com | |
上传镜像 | |
docker push jingslunt/webcron:lastest | |
第三方用户使用: | |
``` | |
docker run -it -p 8300:8300 jingslunt/webcron:lastest | |
/opt/webcron/run.sh restart | |
``` | |
登陆: | |
http://your-ip:8300 | |
admin | |
admin888 | |
docker地址 | |
[https://store.docker.com/community/images/jingslunt/webcron](https://store.docker.com/community/images/jingslunt/webcron) | |
![](http://ww1.sinaimg.cn/large/6e557adagy1fspu6pzttvj210909v74k.jpg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment