forked from eyebluecn/tank
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
# 使用最新的golang作为母镜像 | ||
FROM golang:latest | ||
# 使用1.8的golang作为母镜像 | ||
FROM golang:1.8 | ||
|
||
# 维护者信息 | ||
MAINTAINER eyeblue "[email protected]" | ||
|
||
WORKDIR $GOPATH/src/hellodocker | ||
ADD . $GOPATH/src/hellodocker | ||
RUN go build . | ||
# 指定工作目录就是 tank | ||
WORKDIR $GOPATH/src/tank | ||
|
||
# 将tank项目下的所有文件移动到golang镜像中去 | ||
ADD . $GOPATH/src/tank | ||
|
||
EXPOSE 8080 | ||
# 开始编译 | ||
RUN ./build/pack/build.sh | ||
|
||
ENTRYPOINT ["./hellodocker"] | ||
# 暴露6010端口 | ||
EXPOSE 6010 | ||
|
||
ENTRYPOINT ["../../bin/tank"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3' | ||
services: | ||
|
||
web: | ||
build: . | ||
ports: | ||
- "5000:5000" | ||
|
||
redis: | ||
image: "redis:alpine" |