From a205ec2c9681e2ecba30ec83c22242da99d932c6 Mon Sep 17 00:00:00 2001 From: ynqa Date: Fri, 29 May 2020 16:00:13 +0900 Subject: [PATCH] update dockerfile to use go v1.14.x --- .travis.yml | 9 ++------- Dockerfile | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index e904782..e5f4025 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,7 @@ language: go go: - - "1.12.x" - - "1.13.x" - - tip + - "1.14.x" services: - docker @@ -13,9 +11,6 @@ addons: packages: - docker-ce -env: - - GO111MODULE=on - before_install: - go get github.com/mattn/goveralls @@ -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 . diff --git a/Dockerfile b/Dockerfile index 0574a3b..ad114aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,4 @@ -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 @@ -10,11 +6,10 @@ 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"]