mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-04-10 05:56:42 +00:00
New Dockerfile and Travis Config (#23)
This commit is contained in:
parent
281d2d17d6
commit
9f1402e841
16
.travis.yml
16
.travis.yml
@ -1,5 +1,13 @@
|
||||
language: go
|
||||
sudo: required
|
||||
|
||||
go:
|
||||
- "1.11.x"
|
||||
- master
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- docker build -t terorie/od-database-crawler .
|
||||
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_BRANCH" == "stable" ]]; then
|
||||
docker login -u terorie -p $DOCKER_PASSWORD ;
|
||||
docker push terorie/od-database-crawler ;
|
||||
fi
|
||||
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM golang:1.11.5 AS builder
|
||||
ADD . /src
|
||||
RUN cd /src \
|
||||
&& go test . \
|
||||
&& go build -o binary
|
||||
|
||||
FROM alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /src/binary /app/
|
||||
ENTRYPOINT ./binary
|
Loading…
x
Reference in New Issue
Block a user