From 852030b141a2675c427ea032133685f810a95075 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sat, 8 Dec 2018 16:07:11 +0100 Subject: [PATCH] docker: Trimmed down DockerFile. --- Dockerfile | 18 ++++++++---------- Gopkg.toml | 3 --- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c7b4ff..1f1dede 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,28 +7,26 @@ WORKDIR /go/src/git.aiterp.net/rpdata/api/ COPY . . RUN rm -rf ./vendor -# Load build tools and dependencies +# Install build tools and dependencies RUN go get -u github.com/golang/dep/cmd/dep RUN go get -u github.com/vektah/gorunpkg -RUN go get -u github.com/jteeuwen/go-bindata/... RUN dep ensure RUN go generate ./... # Build server and tools (CGO disabled to make them 100% static) ENV CGO_ENABLED 0 -RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-server ./cmd/rpdata-server -RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-lb2charimport ./cmd/rpdata-lb2charimport -RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-lb2logimport ./cmd/rpdata-lb2logimport -# TODO: RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-wikifileimport ./cmd/rpdata-wikifileimport -RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-ensurechannels ./cmd/rpdata-ensurechannels -RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-as2storyimport ./cmd/rpdata-as2storyimport -RUN go build -a -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-logpaste ./cmd/rpdata-logpaste +RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-server ./cmd/rpdata-server +RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-lb2charimport ./cmd/rpdata-lb2charimport +RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-lb2logimport ./cmd/rpdata-lb2logimport +# TODO: RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-wikifileimport ./cmd/rpdata-wikifileimport +RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-ensurechannels ./cmd/rpdata-ensurechannels +RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-as2storyimport ./cmd/rpdata-as2storyimport ## 2. Distribute # Use alpine linux FROM alpine:3.7 -# Install certificates to enable HTTPS GET requests, and tzdata for logpaste +# Install certificates to enable HTTPS GET requests, and tzdata for log imports. RUN apk add --no-cache ca-certificates tzdata # Copy build files into final container diff --git a/Gopkg.toml b/Gopkg.toml index 5644f6e..808a883 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -38,9 +38,6 @@ required = [ "github.com/99designs/gqlgen" ] go-tests = true unused-packages = true -[[constraint]] - branch = "master" - name = "github.com/graph-gophers/graphql-go" [[constraint]] name = "github.com/stretchr/testify" version = "1.2.2"