fix dockerfile

This commit is contained in:
Thom Seddon 2019-01-30 17:15:40 +00:00
parent 0f278d516b
commit 19c249a6d1

View File

@ -1,17 +1,19 @@
FROM golang:1.10-alpine as builder
# Setup
RUN mkdir /app
WORKDIR /app
RUN mkdir -p /go/src/github.com/thomseddon/traefik-forward-auth
WORKDIR /go/src/github.com/thomseddon/traefik-forward-auth
# Add libraries
RUN apk add --no-cache git && \
go get "github.com/BurntSushi/toml" && \
go get "github.com/gorilla/mux" && \
go get "github.com/namsral/flag" && \
go get "github.com/sirupsen/logrus" && \
apk del git
# Copy & build
ADD . /app/
ADD . /go/src/github.com/thomseddon/traefik-forward-auth/
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /traefik-forward-auth .
# Copy into scratch container