2022-03-17 22:51:40 +03:00
|
|
|
# Copyright 2022 The Go Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
FROM golang:1.18 AS build
|
|
|
|
|
|
|
|
COPY go.mod /app/go.mod
|
|
|
|
COPY go.sum /app/go.sum
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
RUN go build -o run-influx golang.org/x/build/influx
|
|
|
|
|
|
|
|
FROM marketplace.gcr.io/google/influxdb2:latest
|
|
|
|
|
|
|
|
COPY --from=build /app/run-influx /run-influx
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/sh"]
|
2022-03-18 19:16:57 +03:00
|
|
|
CMD ["-c", "/run-influx -listen-http=:80"]
|