1# Run this dockerfile from the top level of the indigo git repository like:
2#
3# podman build -f ./cmd/palomar/Dockerfile -t palomar .
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 /palomar ./cmd/palomar
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/palomar
25COPY --from=build-env /palomar /
26
27# small things to make golang binaries work well under alpine
28ENV GODEBUG=netdns=go
29ENV TZ=Etc/UTC
30
31EXPOSE 3999
32
33CMD ["/palomar", "run"]
34
35LABEL org.opencontainers.image.source=https://github.com/bluesky-social/indigo
36LABEL org.opencontainers.image.description="atproto Search Service (for app.bsky Lexicon)"
37LABEL org.opencontainers.image.licenses=MIT