diff options
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"] |
