Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the plugin in the build stage #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Docker image for the Drone build runner
#
# CGO_ENABLED=0 go build -a -tags netgo
# docker build --rm=true -t rics3n/drone-ansible .

FROM williamyeh/ansible:alpine3

ADD drone-ansible /bin/
FROM golang:1.9.2 AS builder
WORKDIR /go/src/github.com/alexellis/drone-ansible/
COPY . .
RUN CGO_ENABLED=0 go build -a -tags netgo

ENTRYPOINT ["/bin/drone-ansible"]
FROM williamyeh/ansible:alpine3
COPY --from=builder /go/src/github.com/alexellis/drone-ansible/drone-ansible /bin/
ENTRYPOINT ["/bin/drone-ansible"]
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build:
docker build --rm=true -t rics3n/drone-ansible:2 .
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ go test
Build the docker image with the following commands:

```
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
docker build --rm=true -t rics3n/drone-ansible:2 .
```

Expand Down