golang.org/x/build@v0.0.0-20240506185731-218518f32b70/influx/Dockerfile (about) 1 # Copyright 2022 The Go Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 FROM golang:1.21 AS build 6 7 COPY go.mod /app/go.mod 8 COPY go.sum /app/go.sum 9 10 WORKDIR /app 11 12 RUN go mod download 13 14 COPY . /app 15 16 # Disable cgo because the influxdb2 container image may have an older version 17 # of glibc. 18 ENV CGO_ENABLED=0 19 20 RUN go build -o run-influx golang.org/x/build/influx 21 22 FROM marketplace.gcr.io/google/influxdb2:latest 23 24 COPY --from=build /app/run-influx /run-influx 25 26 ENTRYPOINT ["/bin/sh"] 27 CMD ["-c", "/run-influx -listen-http=:80"]