Skip to content

Commit

Permalink
docker build on travis
Browse files Browse the repository at this point in the history
skip goreleaser docker

Signed-off-by: Avelino <t@avelino.xxx>
  • Loading branch information
avelino committed Aug 16, 2020
1 parent cfd6c9c commit 18d439d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Expand Up @@ -36,7 +36,11 @@ script:
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
script:
- curl -sL https://git.io/goreleaser | bash
- docker build
- docker push prest/prest:latest
- docker push prest/prest:v1
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
Expand Down
15 changes: 12 additions & 3 deletions Dockerfile
@@ -1,4 +1,13 @@
FROM alpine:3.7
COPY prestd /app/prestd
COPY ./cmd/prestd/prest.toml /app/prest.toml
FROM golang:alpine as builder

COPY . /go/src/github.com/prest/prest
WORKDIR /go/src/github.com/prest/prest
ENV GO111MODULE=on
RUN apk add --no-cache git && \
go build ./cmd/prestd/

FROM alpine

COPY --from=builder /go/src/github.com/prest/prest/prestd /app/prestd
ADD ./cmd/prestd/prest.toml /app/prest.toml
CMD ["/app/prestd"]

0 comments on commit 18d439d

Please sign in to comment.