aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 6008cfe78824b82719c54b0f383e90b7be8bb8f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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"]