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:
parent
af8075602e
commit
41e62311ed
15
.drone.yml
Normal file
15
.drone.yml
Normal 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
9
Dockerfile
Normal 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"]
|
@ -1,4 +0,0 @@
|
||||
from gcr.io/distroless/base
|
||||
expose 8080
|
||||
copy vanityserver /vanityserver
|
||||
entrypoint ["/vanityserver"]
|
Loading…
x
Reference in New Issue
Block a user