From 99c5040650a49c6f7d745d6c85b753e14408e668 Mon Sep 17 00:00:00 2001 From: Eduard Marbach Date: Wed, 30 Oct 2024 14:16:39 +0100 Subject: [PATCH] docs: add docker examples --- Dockerfile | 25 +++++++++++++++++++++++++ docker-compose.yml | 8 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..abe2cc4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# syntax=docker/dockerfile:1 + +FROM golang:1.23 AS BUILD +WORKDIR /app + +# Download Go modules +COPY go.mod go.sum ./ +RUN go mod download + +# Copy the source code. Note the slash at the end, as explained in +# https://docs.docker.com/reference/dockerfile/#copy +COPY *.go ./ + +# Build +RUN CGO_ENABLED=0 GOOS=linux go build -o /turbostat-exporter + +FROM debian:12.7-slim + +RUN <