Build Docker image with Drone

git-svn-id: file:///srv/svn/repo/toyohime/trunk@98 922d331f-388e-da47-97a9-ad700dc0b8b9
This commit is contained in:
jonbetti 2018-06-07 19:16:02 +00:00
parent af8075602e
commit 41e62311ed
3 changed files with 24 additions and 4 deletions

15
.drone.yml Normal file
View File

@ -0,0 +1,15 @@
workspace:
base: /go
path: src/go.jonnrb.io/vanity
pipeline:
build:
image: golang:latest
commands:
- go get -t ./...
- go test ./...
- go build ./...
docker:
image: plugins/docker
repo: jonnrb/vanityserver
secrets: [ docker_username, docker_password ]

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
from golang:1.10.1 as build
add . /go/src/go.jonnrb.io/vanity
workdir /go/src/go.jonnrb.io/vanity
run go install ./cmd/vanityserver
from gcr.io/distroless/base
expose 8080
copy --from=build /go/bin/vanityserver /vanityserver
entrypoint ["/vanityserver"]

View File

@ -1,4 +0,0 @@
from gcr.io/distroless/base
expose 8080
copy vanityserver /vanityserver
entrypoint ["/vanityserver"]