Skip to content

Commit

Permalink
Migrate repo to Go modules (#58)
Browse files Browse the repository at this point in the history
This change migrates the repo from dep to Go modules. Changes include:
- replace Gopkg.toml and GoPkg.lock with go.mod and go.sum
- update Dockerfile to no longer rely on GOPATH
- remove vendor
- update max-rps to new gonum dependency version
- upgrade to circleci2

Signed-off-by: Andrew Seigner <[email protected]>
  • Loading branch information
siggy authored Feb 26, 2019
1 parent 1957067 commit 1c7da2f
Show file tree
Hide file tree
Showing 1,132 changed files with 122 additions and 480,426 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.11.5-stretch
steps:
- checkout
- restore_cache:
keys:
- go-build-cache
- run: go test -v ./...
- save_cache:
key: go-build-cache
paths:
- ~/.cache/go-build
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
FROM golang:1.11.1-stretch as build
ADD . /go/src/github.com/buoyantio/strest-grpc
RUN CGO_ENABLED=0 go build -installsuffix cgo -o /go/bin/strest-grpc /go/src/github.com/buoyantio/strest-grpc/main.go
FROM golang:1.11.5-stretch as build

FROM alpine:3.8
WORKDIR /strest-grpc

COPY go.mod .
COPY go.sum .
RUN go mod download

COPY . .

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -o ./strest-grpc

FROM alpine:3.9
RUN apk --update upgrade && \
apk add ca-certificates curl nghttp2 && \
update-ca-certificates && \
rm -rf /var/cache/apk/*
COPY --from=build /go/bin /go/bin
ENTRYPOINT ["/go/bin/strest-grpc"]
COPY --from=build /strest-grpc/strest-grpc /strest-grpc/
ENTRYPOINT ["/strest-grpc/strest-grpc"]
316 changes: 0 additions & 316 deletions Gopkg.lock

This file was deleted.

Loading

0 comments on commit 1c7da2f

Please sign in to comment.