forked from
willdot.net/cocoon
A fork of the Cocoon PDS but being made more distributed.
1### Compile stage
2FROM golang:1.26-alpine AS build-env
3
4WORKDIR /dockerbuild
5ADD . .
6
7RUN apk add git
8
9RUN GIT_VERSION=$(git describe --tags --long --always || echo "dev-local") && \
10 go mod tidy && \
11 go build -ldflags "-X main.Version=$GIT_VERSION" -o cocoon ./cmd/cocoon
12
13### Run stage
14FROM alpine:3 AS run
15
16RUN apk add dumb-init curl
17ENTRYPOINT ["dumb-init", "--"]
18
19WORKDIR /
20RUN mkdir -p data/cocoon
21COPY --from=build-env /dockerbuild/cocoon /
22
23COPY ./init-keys.sh /
24COPY ./create-initial-invite.sh /
25
26CMD ["/cocoon", "run"]
27
28LABEL org.opencontainers.image.source=https://github.com/haileyok/cocoon
29LABEL org.opencontainers.image.description="Cocoon ATProto PDS"
30LABEL org.opencontainers.image.licenses=MIT