From 4ad5411437ec615eeed5ba4879b68b410a6b8ec4 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 7 Dec 2016 10:17:04 +0800 Subject: [PATCH] fix build image for webhook. Signed-off-by: Bo-Yi Wu --- Makefile | 2 +- example/Dockerfile | 5 +++-- example/README.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1356ad8..1805fae 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ docker_image: docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) . docker_webhook_image: - docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_WEBHOOK_IMAGE) example + docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_WEBHOOK_IMAGE) -f example/Dockerfile . docker: docker_build docker_image docker_webhook_image diff --git a/example/Dockerfile b/example/Dockerfile index e1f949f..4887690 100644 --- a/example/Dockerfile +++ b/example/Dockerfile @@ -6,9 +6,10 @@ ENV CHANNEL_TOKEN $CHANNEL_TOKEN ENV PORT 8089 RUN apk update && apk upgrade && \ - apk add --no-cache git + apk add --no-cache git && \ + rm -rf /var/cache/apk/* -ADD server.go $app/ +ADD example/server.go $app/ WORKDIR $app RUN go get -t -v ./... diff --git a/example/README.md b/example/README.md index 3dbc34f..6438bfc 100644 --- a/example/README.md +++ b/example/README.md @@ -24,7 +24,7 @@ $ go run server.go Build your own docker image. ```bash -$ docker build -t appleboy/drone-line-webhook . +$ docker build -t appleboy/drone-line-webhook -f example/Dockerfile . ``` or download image from [docker hub](https://hub.docker.com/r/appleboy/drone-line-webhook/).