ssube/prometheus-sql-adapter

View on GitHub
docker/Dockerfile.psql-10

Summary

Maintainability
Test Coverage
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:10 AS run

COPY --from=build /go/src/github.com/ssube/prometheus-sql-adapter/prometheus-sql-adapter /app/prometheus-sql-adapter
COPY ./package.json /app/
COPY ./schema /app/schema/
COPY ./scripts /app/scripts/

ENTRYPOINT [ "/app/prometheus-sql-adapter" ]