1# Run this dockerfile from the top level of the indigo git repository like:
2#
3# podman build -f ./cmd/hepa/Dockerfile -t hepa .
4
5### Compile stage
6FROM golang:1.24-alpine3.22 AS build-env
7RUN apk add --no-cache build-base make git
8
9ADD . /dockerbuild
10WORKDIR /dockerbuild
11
12# timezone data for alpine builds
13ENV GOEXPERIMENT=loopvar
14RUN GIT_VERSION=$(git describe --tags --long --always) && \
15 go build -tags timetzdata -o /hepa ./cmd/hepa
16
17### Run stage
18FROM alpine:3.22
19
20RUN apk add --no-cache --update dumb-init ca-certificates runit
21ENTRYPOINT ["dumb-init", "--"]
22
23WORKDIR /
24RUN mkdir -p data/hepa
25COPY --from=build-env /hepa /
26
27# small things to make golang binaries work well under alpine
28ENV GODEBUG=netdns=go
29ENV TZ=Etc/UTC
30
31EXPOSE 2210
32
33CMD ["/hepa", "run"]
34
35LABEL org.opencontainers.image.source=https://github.com/bluesky-social/indigo
36LABEL org.opencontainers.image.description="atproto Auto-Moderation Service (hepa, indigo edition)"
37LABEL org.opencontainers.image.licenses=MIT