repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / bouncer
Antonio Mika · 10 Sep 24

Dockerfile

 1FROM golang:1.22-alpine AS builder
 2
 3WORKDIR /app
 4
 5RUN apk add --no-cache git sqlite-libs sqlite-dev build-base
 6
 7RUN git clone https://codeberg.org/emersion/soju.git
 8
 9COPY subscriber-change.diff .
10
11WORKDIR /app/soju
12
13RUN git apply ../subscriber-change.diff
14
15ENV LDFLAGS="-linkmode external -extldflags -static"
16ENV GOFLAGS="-tags=moderncsqlite"
17
18RUN go build -ldflags "$LDFLAGS" ./cmd/soju
19RUN go build -ldflags "$LDFLAGS" ./cmd/sojuctl
20
21FROM alpine
22
23WORKDIR /app
24
25COPY soju.config .
26COPY --from=builder /app/soju/soju .
27COPY --from=builder /app/soju/sojuctl .
28
29EXPOSE 6697
30EXPOSE 8080
31
32ENTRYPOINT ["/app/soju", "-config", "/app/soju.config"]