Refine the whole docker config.
This commit is contained in:
parent
47edf4c4d4
commit
2a8fbb7b86
11
Dockerfile
11
Dockerfile
@ -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"]
|
||||||
|
@ -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",
|
||||||
|
@ -14,6 +14,7 @@ services:
|
|||||||
|
|
||||||
tank:
|
tank:
|
||||||
build: .
|
build: .
|
||||||
|
image: tank:1.0.2
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
ports:
|
ports:
|
||||||
|
Loading…
Reference in New Issue
Block a user