Skip to content

Commit

Permalink
makefile add docker images tag support
Browse files Browse the repository at this point in the history
  • Loading branch information
archfish committed Aug 8, 2018
1 parent 1ff021c commit 7b50c15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ DIST_DIR = $(ROOT_DIR)dist/
ETCD_VER = v3.0.14
ETCD_DOWNLOAD_URL = https://github.com/coreos/etcd/releases/download

DOCKER_TAG = $(shell date +%Y%m%d%H%M)
DOCKER_TAG := $(tag)

ifeq ("$(DOCKER_TAG)","")
DOCKER_TAG := $(shell date +%Y%m%d%H%M)
endif

.PHONY: release
release: dist_dir apiserver proxy;
Expand Down
4 changes: 4 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ go build -o apiserver ./...
- 打包为docker镜像

```bash
# 使用默认的docker image tag,即当前编译时间
make docker
# 自定义docker image tag
make docker tag='this_is_my_tag'
```

- 更多使用说明
Expand Down

0 comments on commit 7b50c15

Please sign in to comment.