From 448d6e76011787df25712023ed047f9589d7130b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E7=A7=80=E6=9C=8B?= Date: Wed, 26 Dec 2018 10:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker=E6=89=93=E5=8C=85?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 9 ++++----- docker-compose.yml | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 93d7317..ad5ac07 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,16 @@ default: @echo 'Usage of make: [ build | linux_build | windows_build | build_web | clean ]' build: - @go build -ldflags "-X main.VERSION=1.0.0 -X main.GIT_HASH=`git rev-parse HEAD` -s" -o ./bin/etcd-manage ./ + @go build -o ./bin/etcd-manage ./ linux_build: - @CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.VERSION=1.0.0 -X main.GIT_HASH=`git rev-parse HEAD` -s" -o ./bin/etcd-manage ./ + @CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/etcd-manage ./ windows_build: - @CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-X main.VERSION=1.0.0 -X main.GIT_HASH=`git rev-parse HEAD` -s" -o ./bin/etcd-manage.exe ./ + @CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./bin/etcd-manage.exe ./ docker_build: linux_build - - + docker build -t shiguanghuxian/etcd-manage . run: build @./bin/etcd-manage diff --git a/docker-compose.yml b/docker-compose.yml index 27672fa..b7f170b 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,8 @@ services: - 2380:2380 - 4001:4001 etcd-manage: - build: . + # build: . + image: "shiguanghuxian/etcd-manage" volumes: - ./bin/config/cfg.toml:/app/config/cfg.toml ports: