matrix-sliding-sync/Containerfile
Sebastian Hugentobler ae5fa40469
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Failing after 4m8s
run with an unprivileged user
2024-05-31 09:35:19 +02:00

30 lines
572 B
Docker

FROM docker.io/golang:1.22-alpine3.20 as builder
ENV CGO_ENABLED=0
RUN apk --no-cache add \
git
WORKDIR /build
ENV VERSION=v0.99.18
RUN git clone https://github.com/matrix-org/sliding-sync.git
WORKDIR /build/sliding-sync
RUN git checkout $VERSION
RUN go build ./cmd/syncv3
FROM docker.io/alpine:3.20
RUN addgroup -g 2222 matrix-sync
RUN adduser -h /var/lib/matrix-sync -u 2222 -D -G matrix-sync matrix-sync
RUN apk --no-cache add \
ca-certificates
COPY --from=builder /build/sliding-sync/syncv3 /syncv3
USER matrix-sync
ENTRYPOINT [ "/syncv3" ]
EXPOSE 8008