mirror of
https://github.com/appleboy/drone-ssh.git
synced 2026-02-17 09:48:50 +08:00
feat: add multiple stage build for docker. (#96)
* feat: add multiple stage build for docker. * remove unused target Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -109,14 +109,12 @@ release-check:
|
||||
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
|
||||
|
||||
# for docker.
|
||||
static_build:
|
||||
docker_build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o $(DEPLOY_IMAGE)
|
||||
|
||||
docker_image:
|
||||
docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) .
|
||||
|
||||
docker: static_build docker_image
|
||||
|
||||
docker_deploy:
|
||||
ifeq ($(tag),)
|
||||
@echo "Usage: make $@ tag=<tag>"
|
||||
|
||||
Reference in New Issue
Block a user