Finish docker.

This commit is contained in:
zicla 2019-05-24 04:54:54 +08:00
parent 60eac561bb
commit db891c7342
3 changed files with 38 additions and 27 deletions

View File

@ -33,7 +33,8 @@ docker container prune
# 构建新版本 (最后的.不能少)
docker build -t eyeblue/tank:x.x.x .
# 本地测试
docker run --name tank -p 6010:6010 -d eyeblue/tank:x.x.x
docker run --name dockermysql -p 13306:3306 -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_DATABASE=tank -e MYSQL_USER=tank -e MYSQL_PASSWORD=tank123 -v ~/data/dockermysql:/var/lib/mysql -d mysql:5.7
docker run --name tank -p 6010:6010 --link dockermysql:mysql -v ~/data/dockermatter:/data/matter -d eyeblue/tank:x.x.x
# 没问题后,推送到远程
docker push eyeblue/tank:x.x.x
```
@ -51,6 +52,22 @@ b. 上传 tank-x.x.x.windows-x86_64.zip 到蓝眼云盘
c. 在github上发布新版本。
2019-05-23
tank-3.0.0
1. 分享文件夹
2. 使用口令提取分享的文件
3. 允许用户自行注册
4. 本地文件映射功能
5. 存放的物理文件,按照物理目录排布
6. 允许用户名进行登录
7. 访问日志只保留7天数据
8. 下载文件夹,下载文件夹大小设上限
9. 支持Webdav
10. 增加用户文件总大小,增加用户文件总大小限制
11. 加入管理员变身功能。使用用户的身份进行登录。
12. i18n
2019-01-07
tank-2.0.0
1. 添加了图片文件裁剪图的缓存,全面提升缩略图的访问速度。

View File

@ -1,35 +1,27 @@
# 使用1.9的golang作为母镜像
FROM golang:1.9
# use golang 1.12
FROM golang:1.12
# 维护者信息,也就是作者的姓名和邮箱
# maintainer. Author's name and email.
MAINTAINER eyeblue "eyebluecn@126.com"
# 指定工作目录就是 tank。工作目录指的就是以后 每层构建的当前目录 。
WORKDIR $GOPATH/src/tank
# work directory.
WORKDIR /data
# 将tank项目下的所有文件移动到golang镜像中去
COPY . $GOPATH/src/tank
# Copy this project to /data
COPY . /data
# 这里为了维持docker无状态性准备数据卷上传文件目录
VOLUME /data/matter
# in order to make docker stateless. Prepare a volumn
VOLUME /data/build/matter
# 将文件存放的位置指定到挂载的这个点。
# golang.org库国内无法下载这里从我准备的github中clone
# github.com的库可以直接通过`go get`命令下载
# `go install tank`是对项目进行打包
# `cp`是将项目需要的html等文件移动到可执行文件的目录下。
RUN echo '{"ServerPort": 6010,"MatterPath": "/data/matter"}' > $GOPATH/src/tank/build/conf/tank.json \
&& git clone https://github.com/eyebluecn/golang.org.git $GOPATH/src/golang.org \
&& go get github.com/disintegration/imaging \
&& go get github.com/json-iterator/go \
&& go get github.com/go-sql-driver/mysql \
&& go get github.com/jinzhu/gorm \
&& go get github.com/nu7hatch/gouuid \
&& go install tank \
&& cp -r $GOPATH/src/tank/build/* $GOPATH/bin
# proxy
ENV GOPROXY=https://goproxy.io
# 声明运行时容器提供服务端口这只是一个声明。默认是6010端口
# prepare the config file
RUN go build -mod=readonly \
&& cp -r /data/tank /data/build
# use 6010 as default.
EXPOSE 6010
# tank作为执行文件 启动这个容器就会去执行 `/go/bin/tank`
ENTRYPOINT ["/go/bin/tank"]
# tank as execute file.
ENTRYPOINT ["/data/build/tank"]

View File

@ -6,6 +6,8 @@
[在线Demo](https://tank.eyeblue.cn) (体验账号: demo 密码123456)
[文档](https://tank-doc.eyeblue.cn/)
![](https://tank.eyeblue.cn/api/alien/download/df372827-ba56-415e-42d1-0e3a34fdb2a1/github20x20.png "github20x20.png") [后端tank地址](https://github.com/eyebluecn/tank)
![](https://tank.eyeblue.cn/api/alien/download/df372827-ba56-415e-42d1-0e3a34fdb2a1/github20x20.png "github20x20.png") [前端tank-front地址](https://github.com/eyebluecn/tank-front)