-
Notifications
You must be signed in to change notification settings - Fork 145
/
Copy pathDockerfile
37 lines (27 loc) · 1001 Bytes
/
Dockerfile
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
30
31
32
33
34
35
36
37
# Run this dockerfile from the top level of the indigo git repository like:
#
# podman build -f ./cmd/palomar/Dockerfile -t palomar .
### Compile stage
FROM golang:1.23-alpine3.20 AS build-env
RUN apk add --no-cache build-base make git
ADD . /dockerbuild
WORKDIR /dockerbuild
# timezone data for alpine builds
ENV GOEXPERIMENT=loopvar
RUN GIT_VERSION=$(git describe --tags --long --always) && \
go build -tags timetzdata -o /palomar ./cmd/palomar
### Run stage
FROM alpine:3.20
RUN apk add --no-cache --update dumb-init ca-certificates
ENTRYPOINT ["dumb-init", "--"]
WORKDIR /
RUN mkdir -p data/palomar
COPY --from=build-env /palomar /
# small things to make golang binaries work well under alpine
ENV GODEBUG=netdns=go
ENV TZ=Etc/UTC
EXPOSE 3999
CMD ["/palomar", "run"]
LABEL org.opencontainers.image.source=https://github.com/bluesky-social/indigo
LABEL org.opencontainers.image.description="atproto Search Service (for app.bsky Lexicon)"
LABEL org.opencontainers.image.licenses=MIT