Skip to content

Commit

Permalink
Add more things into Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
hxsherry committed Jan 28, 2018
1 parent 84df856 commit 4bc9739
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Dockerfile
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"]
10 changes: 10 additions & 0 deletions docker-compose.yml
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"

0 comments on commit 4bc9739

Please sign in to comment.