A fork of the Cocoon PDS but being made more distributed.
0

Configure Feed

Select the types of activity you want to include in your feed.

[Docker] Alpine image (#74)

* build(docker): create alpine based image

* docs(readme): use alpine-based docker image

+52 -1
+30
Dockerfile.alpine
··· 1 + ### Compile stage 2 + FROM golang:1.26-alpine AS build-env 3 + 4 + WORKDIR /dockerbuild 5 + ADD . . 6 + 7 + RUN apk add git 8 + 9 + RUN 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 14 + FROM alpine:3 AS run 15 + 16 + RUN apk add dumb-init curl 17 + ENTRYPOINT ["dumb-init", "--"] 18 + 19 + WORKDIR / 20 + RUN mkdir -p data/cocoon 21 + COPY --from=build-env /dockerbuild/cocoon / 22 + 23 + COPY ./init-keys.sh / 24 + COPY ./create-initial-invite.sh / 25 + 26 + CMD ["/cocoon", "run"] 27 + 28 + LABEL org.opencontainers.image.source=https://github.com/haileyok/cocoon 29 + LABEL org.opencontainers.image.description="Cocoon ATProto PDS" 30 + LABEL org.opencontainers.image.licenses=MIT
+22 -1
README.md
··· 1 1 # Cocoon 2 2 3 3 > [!WARNING] 4 - I migrated and have been running my main account on this PDS for months now without issue, however, I am still not responsible if things go awry, particularly during account migration. Please use caution. 4 + > I migrated and have been running my main account on this PDS for months now without issue, however, I am still not responsible if things go awry, particularly during account migration. Please use caution. 5 5 6 6 Cocoon is a PDS implementation in Go. It is highly experimental, and is not ready for any production use. 7 7 ··· 169 169 - With `COCOON_S3_CDN_URL`: `getBlob` returns a 302 redirect to `{CDN_URL}/blobs/{did}/{cid}` 170 170 171 171 > **Tip**: For Cloudflare R2, you can use the public bucket URL as the CDN URL. For AWS S3, you can use CloudFront or the S3 bucket URL directly if public access is enabled. 172 + 173 + #### Alpine based image 174 + 175 + The default image is based on Debian. You can use the Alpine-based image if you prefer. 176 + 177 + > [!NOTE] 178 + > Currently, we do not have pre-built Alpine-based image on the GitHub Container Registry. You have to build them locally. 179 + 180 + In the compose file, replace every `dockerfile: Dockerfile` by `dockerfile: Dockerfile.alpine`, e.g. 181 + ```yml 182 + services: 183 + cocoon: 184 + build: 185 + context: . 186 + dockerfile: Dockerfile.alpine 187 + ``` 188 + 189 + You can also build the image locally with 190 + ```bash 191 + docker build -f Dockerfile.alpine -t cocoon:alpine . 192 + ``` 172 193 173 194 ### Management Commands 174 195