From 55ca9eb060fb9e55c33f4ec35f4c6d1e27873d8b Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 26 Oct 2026 22:31:34 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6008cfe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +## +# Builder + +FROM golang:1.24-alpine AS builder + +WORKDIR /app + +COPY main.go . +RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o piupiu main.go + +## +# The production-ready thingie. + +FROM alpine:latest + +# Install CA certificates for HTTPS requests to the X API. +RUN apk --no-cache add ca-certificates + +# My glorious 'piupiu' ""app"". +WORKDIR /app +COPY --from=builder /app/piupiu /usr/local/bin/piupiu + +# Define the output directory as a volume mount point. +RUN mkdir -p /app/output +VOLUME ["/app/output"] + +# Set the entrypoint and default arguments +ENTRYPOINT ["piupiu"] +CMD ["-o", "/app/output"] -- cgit v1.2.3