diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..72c5f86 --- /dev/null +++ b/.drone.yml @@ -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 ] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c4eb2ff --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/cmd/vanityserver/Dockerfile b/cmd/vanityserver/Dockerfile deleted file mode 100644 index b58c3d1..0000000 --- a/cmd/vanityserver/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -from gcr.io/distroless/base -expose 8080 -copy vanityserver /vanityserver -entrypoint ["/vanityserver"]