Merge pull request #425 from strukturag/docker-fixes

Fix docker images.
This commit is contained in:
Joachim Bauch 2023-02-22 11:55:45 +01:00 committed by GitHub
commit 63c51309ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 7 deletions

View file

@ -15,6 +15,9 @@ on:
permissions:
contents: read
env:
TEST_TAG: strukturag/nextcloud-spreed-signaling:janus-test
jobs:
build:
runs-on: ubuntu-latest
@ -29,3 +32,9 @@ jobs:
uses: docker/build-push-action@v4
with:
context: docker/janus
load: true
tags: ${{ env.TEST_TAG }}
- name: Test Docker image
run: |
docker run --rm ${{ env.TEST_TAG }} /usr/local/bin/janus --version

View file

@ -9,6 +9,9 @@ on:
permissions:
contents: read
env:
TEST_TAG: strukturag/nextcloud-spreed-signaling:test
jobs:
server:
runs-on: ubuntu-latest
@ -22,6 +25,18 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image for testing
uses: docker/build-push-action@v4
with:
context: .
file: docker/server/Dockerfile
load: true
tags: ${{ env.TEST_TAG }}
- name: Test Docker image
run: |
docker run --rm ${{ env.TEST_TAG }} /usr/bin/nextcloud-spreed-signaling --version
- name: Build Docker image
uses: docker/build-push-action@v4
with:
@ -41,9 +56,21 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image for testing
uses: docker/build-push-action@v4
with:
context: .
file: docker/proxy/Dockerfile
load: true
tags: ${{ env.TEST_TAG }}
- name: Test Docker image
run: |
docker run --rm ${{ env.TEST_TAG }} /usr/bin/nextcloud-spreed-signaling-proxy --version
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/proxy/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64

View file

@ -10,11 +10,13 @@ RUN apt-get -y update && \
if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make proxy -j$(nproc); else \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make proxy -j$(nproc); fi
FROM alpine:3
FROM debian:bullseye-slim
ENV CONFIG=/config/proxy.conf
RUN adduser -D spreedbackend && \
apk add --no-cache bash ca-certificates libc6-compat libstdc++
RUN adduser --system --no-create-home spreedbackend && \
apt-get update -y && \
apt-get install -y ca-certificates && \
rm -rf /var/apt/lists/*
COPY --from=builder /workdir/bin/proxy /usr/bin/nextcloud-spreed-signaling-proxy
COPY ./proxy.conf.in /config/proxy.conf.in

View file

@ -11,11 +11,13 @@ RUN apt-get -y update && \
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
FROM debian:bullseye-slim
ENV CONFIG=/config/server.conf
RUN adduser -D spreedbackend && \
apk add --no-cache bash ca-certificates libc6-compat libstdc++
RUN adduser --system --no-create-home spreedbackend && \
apt-get update -y && \
apt-get install -y ca-certificates && \
rm -rf /var/apt/lists/*
COPY --from=builder /workdir/bin/signaling /usr/bin/nextcloud-spreed-signaling
COPY ./server.conf.in /config/server.conf.in