mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-13 03:12:47 +02:00
6c6ebb647a
keep Docker images alpine based Signed-off-by: Zoey <zoey@z0ey.de>
28 lines
860 B
Docker
28 lines
860 B
Docker
FROM --platform=${BUILDPLATFORM} golang:1.20-alpine AS builder
|
|
ARG TARGETARCH
|
|
ARG TARGETOS
|
|
|
|
WORKDIR /workdir
|
|
|
|
COPY . .
|
|
RUN apk add --no-cache bash git build-base protobuf && \
|
|
if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make server -j$(nproc); else \
|
|
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make server -j$(nproc); fi
|
|
|
|
FROM alpine:3
|
|
|
|
ENV CONFIG=/config/server.conf
|
|
RUN adduser -D spreedbackend && \
|
|
apk add --no-cache bash tzdata ca-certificates
|
|
|
|
COPY --from=builder /workdir/bin/signaling /usr/bin/nextcloud-spreed-signaling
|
|
COPY ./server.conf.in /config/server.conf.in
|
|
COPY ./docker/server/entrypoint.sh /
|
|
RUN chown spreedbackend /config
|
|
RUN /usr/bin/nextcloud-spreed-signaling -version
|
|
|
|
USER spreedbackend
|
|
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|
|
CMD ["/bin/sh", "-c", "/usr/bin/nextcloud-spreed-signaling -config $CONFIG"]
|