Refine the whole docker config.

This commit is contained in:
zicla 2018-01-29 16:53:10 +08:00
parent 47edf4c4d4
commit 2a8fbb7b86
3 changed files with 11 additions and 3 deletions

View File

@ -11,10 +11,17 @@ WORKDIR $GOPATH/src/tank
COPY . $GOPATH/src/tank COPY . $GOPATH/src/tank
# 开始编译 # 开始编译
RUN ./build/pack/build.sh RUN 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
# 暴露6010端口 # 暴露6010端口
EXPOSE 6010 EXPOSE 6010
# tank作为执行文件 # tank作为执行文件
ENTRYPOINT ["/go/src/tank/dist/tank-1.0.2/tank"] ENTRYPOINT ["/go/bin/tank"]

View File

@ -2,7 +2,7 @@
"ServerPort": 6010, "ServerPort": 6010,
"LogToConsole": false, "LogToConsole": false,
"MysqlPort": 3306, "MysqlPort": 3306,
"MysqlHost": "db", "MysqlHost": "127.0.0.1",
"MysqlSchema": "tank", "MysqlSchema": "tank",
"MysqlUserName": "tank", "MysqlUserName": "tank",
"MysqlPassword": "tank123", "MysqlPassword": "tank123",

View File

@ -14,6 +14,7 @@ services:
tank: tank:
build: . build: .
image: tank:1.0.2
depends_on: depends_on:
- db - db
ports: ports: