Skip to content

Commit

Permalink
update dockerfile to use go v1.14.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed May 29, 2020
1 parent 314c08c commit a205ec2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: go

go:
- "1.12.x"
- "1.13.x"
- tip
- "1.14.x"

services:
- docker
Expand All @@ -13,9 +11,6 @@ addons:
packages:
- docker-ce

env:
- GO111MODULE=on

before_install:
- go get github.com/mattn/goveralls

Expand All @@ -26,7 +21,7 @@ script:
- go test -cover $(go list ./...)

after_script: |
if [[ $TRAVIS_GO_VERSION == 1.13* ]] && [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
if [[ $TRAVIS_GO_VERSION == 1.14* ]] && [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
goveralls -repotoken ${COVERALLS_TOKEN}
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build -t ynqa/wego:latest .
Expand Down
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
FROM golang:1.10.3-alpine3.8 AS builder

RUN apk update \
&& apk add --no-cache git \
&& go get -u github.com/golang/dep/cmd/dep
FROM golang:1.14.3-alpine3.11 AS builder

ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64

WORKDIR /go/src/github.com/ynqa/wego
COPY . .
RUN dep ensure -v -vendor-only
RUN go build -v -o wego .

FROM busybox
COPY --from=builder /go/src/github.com/ynqa/wego/pkg/wego /usr/local/bin/wego
COPY --from=builder /go/src/github.com/ynqa/wego/wego /usr/local/bin/wego

ENTRYPOINT ["wego"]
CMD ["help"]

0 comments on commit a205ec2

Please sign in to comment.