-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 799 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (20 loc) · 799 Bytes
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
### Compile stage
FROM golang:1.26.1-bookworm AS build-env
WORKDIR /dockerbuild
ADD . .
RUN GIT_VERSION=$(git describe --tags --long --always || echo "dev-local") && \
go mod tidy && \
go build -ldflags "-X main.Version=$GIT_VERSION" -o cocoon ./cmd/cocoon
### Run stage
FROM debian:bookworm-slim AS run
RUN apt-get update && apt-get install -y dumb-init runit ca-certificates curl && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["dumb-init", "--"]
WORKDIR /
RUN mkdir -p data/cocoon
COPY --from=build-env /dockerbuild/cocoon /
COPY ./init-keys.sh /
COPY ./create-initial-invite.sh /
CMD ["/cocoon", "run"]
LABEL org.opencontainers.image.source=https://github.com/haileyok/cocoon
LABEL org.opencontainers.image.description="Cocoon ATProto PDS"
LABEL org.opencontainers.image.licenses=MIT