diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-10-26 22:31:34 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-10-26 22:31:34 +0100 |
| commit | 55ca9eb060fb9e55c33f4ec35f4c6d1e27873d8b (patch) | |
| tree | 1fcc48a634bc6ba0a0eb0deb11b78b7020f0df2c /Dockerfile | |
| download | piupiu-55ca9eb060fb9e55c33f4ec35f4c6d1e27873d8b.tar.gz piupiu-55ca9eb060fb9e55c33f4ec35f4c6d1e27873d8b.zip | |
Initial commit
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 29 |
1 files changed, 29 insertions, 0 deletions
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"] |
