docker/Dockerfile.psql-11
FROM golang:1.15 AS build
ARG VERSION_FLAGS
ENV GOPATH=/go
COPY . /go/src/github.com/ssube/prometheus-sql-adapter
WORKDIR /go/src/github.com/ssube/prometheus-sql-adapter
RUN echo "${VERSION_FLAGS}" \
&& go build -ldflags "${VERSION_FLAGS}" .
FROM postgres:11 AS run
COPY --from=build /go/src/github.com/ssube/prometheus-sql-adapter/prometheus-sql-adapter /app/prometheus-sql-adapter
COPY ./schema /app/schema/
ENTRYPOINT [ "/app/prometheus-sql-adapter" ]