i just come out and take a bubble, haha \O^O/

This commit is contained in:
urinx
2017-04-16 21:55:51 +08:00
parent 504cc4f0f6
commit c1e702aafd
38 changed files with 3809 additions and 50 deletions
+18
View File
@@ -0,0 +1,18 @@
FROM ubuntu:16.04
MAINTAINER Urinx <uri.lqy@gmail.com>
RUN apt-get update && \
apt-get install -y python \
python-dev \
python-pip && \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD weixin_bot.tar.gz /
WORKDIR /weixin_bot
RUN pip install -r config/requirements.txt
EXPOSE 80
ENTRYPOINT ["./weixin_bot.py"]
CMD [""]
+49
View File
@@ -0,0 +1,49 @@
# 本地构建 wechat_bot docker 镜像
拉下镜像:
```bash
docker pull ubuntu:16.04
```
打包本项目,将压缩包放到`docker`目录下:
```
tar -czf weixin_bot.tar.gz wxbot_project_py2.7/
```
切换到`docker`目录,执行`build`命令:
```bash
docker build -t wechat-bot .
```
导出镜像:
```bash
docker save wechat-bot > wechat.tar
```
导入镜像:
```bash
docker load < wechat.tar
```
运行:
```bash
docker run -d -P --name xxx -v /src/data/dir:/Wechat_bot/test wechat-bot
```
删除镜像:
```bash
docker rmi -f wechat-bot
```
查看log:
```bash
docker log wechat-bot
```