# The builder and linter for this repository
# Notice how we depend upon nothing twitch specific: just pulling the core golang docker image
FROM golang:1.12.5

# Go modules don't need to be in GOPATH.  Just build/test inside app
WORKDIR /app

COPY . .

# Make sure our code builds
RUN go build -mod=readonly ./...
# Make sure nobody hacked the module repository
RUN go mod verify

# Make sure v7 builds
WORKDIR /app/v7
# Make sure our code builds
RUN go build -mod=readonly ./...
# Make sure nobody hacked the module repository
RUN go mod verify
