nextcloud-spreed-signaling/docker/server/Dockerfile
dependabot[bot] 835836419e
build(deps): Bump golang in /docker/server
Bumps golang from 1.20-alpine to 1.21-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 12:06:36 +00:00

28 lines
838 B
Docker

FROM --platform=${BUILDPLATFORM} golang:1.21-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; else \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make server; 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"]