Skip to content

Commit

Permalink
Merge pull request #425 from strukturag/docker-fixes
Browse files Browse the repository at this point in the history
Fix docker images.
  • Loading branch information
fancycode authored Feb 22, 2023
2 parents 3c6d2d1 + 4a43fe1 commit 63c5130
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/docker-janus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
permissions:
contents: read

env:
TEST_TAG: strukturag/nextcloud-spreed-signaling:janus-test

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -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
29 changes: 28 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
permissions:
contents: read

env:
TEST_TAG: strukturag/nextcloud-spreed-signaling:test

jobs:
server:
runs-on: ubuntu-latest
Expand All @@ -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:
Expand All @@ -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
8 changes: 5 additions & 3 deletions docker/proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63c5130

Please sign in to comment.