Skip to content

Commit

Permalink
Merge pull request #5 from Opendigitalradio/next
Browse files Browse the repository at this point in the history
Standardize and optimize
  • Loading branch information
colisee authored May 2, 2022
2 parents 8eedaa9 + 3d11130 commit 8d62b96
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 55 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
name: docker-publish

on:
release:
types: [published]
workflow_dispatch:
inputs:
docker_version_tag:
description: 'Docker version tag'
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand All @@ -27,20 +20,10 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Set image_tag environment variable
run: |
if test "${{ github.event_name }}" = "workflow_dispatch"
then
echo "image_tag=${{ github.event.inputs.docker_version_tag }}" >> $GITHUB_ENV
else
echo "image_tag=${{ github.ref_name }}" >> $GITHUB_ENV
fi
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: opendigitalradio/dabmux:latest,opendigitalradio/dabmux:${{ env.image_tag }}
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/dabmux:latest,${{ secrets.DOCKER_HUB_USERNAME }}/dabmux:${{ github.ref_name }}
69 changes: 34 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
# Build odr-audioenc
FROM debian:bullseye-slim AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
apt-utils
FROM ubuntu:22.04 AS builder
ARG URL_BASE=https://github.com/Opendigitalradio
ARG SOFTWARE=ODR-DabMux/archive/refs/tags
ARG VERSION=v4.2.1
ENV DEBIAN_FRONTEND=noninteractive
## Update system
RUN apt-get update \
&& apt-get upgrade --yes
## Install build packages
RUN apt-get install --yes \
automake \
autoconf \
build-essential \
curl \
git \
libtool \
pkg-config
## Install development libraries and build
RUN apt-get install --yes \
libboost-system-dev \
libcurl4-openssl-dev \
libzmq3-dev
ARG URL=ODR-DabMux/archive/refs/tags/v4.2.1.tar.gz
RUN cd /root && \
curl -L https://github.com/Opendigitalradio/${URL} | tar -xz && \
cd ODR* && \
./bootstrap.sh && \
./configure && \
make && make install
libzmq3-dev \
&& cd /root \
&& curl -L ${URL_BASE}/${SOFTWARE}/${VERSION}.tar.gz | tar -xz \
&& cd ODR* \
&& ./bootstrap.sh \
&& ./configure \
&& make \
&& make install

# Build the final image
FROM debian:bullseye-slim
ARG DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
## Update system
RUN apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
apt-utils
## Install specific packages
RUN apt-get install --yes \
libboost-system1.74.0 \
libcurl4 \
libzmq5 && \
rm -rf /var/lib/apt/lists/*
## Document image
LABEL org.opencontainers.image.vendor="Open Digital Radio"
LABEL org.opencontainers.image.description="DAB/DAB+ Multiplexer"
LABEL org.opencontainers.image.authors="[email protected]"
RUN apt-get update \
&& apt-get upgrade --yes
## Copy objects built in the builder phase
COPY --from=builder /usr/local/bin/* /usr/bin/
COPY start /usr/local/bin/
## Customization
RUN chmod 0755 /usr/local/bin/start
## Install production libraries
RUN chmod 0755 /usr/local/bin/start \
&& apt-get install --yes \
libboost-system1.74.0 \
libcurl4 \
libzmq5 \
&& rm -rf /var/lib/apt/lists/*

EXPOSE 9001-9016
EXPOSE 9201
EXPOSE 12720-12722
ENTRYPOINT ["start"]
LABEL org.opencontainers.image.vendor="Open Digital Radio"
LABEL org.opencontainers.image.description="DAB/DAB+ Multiplexer"
LABEL org.opencontainers.image.authors="[email protected]"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![docker-publish](https://github.com/Opendigitalradio/docker-dabmux/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/Opendigitalradio/docker-dabmux/actions/workflows/docker-publish.yml)

# opendigitalradio/docker-dabmux

## Introduction
Expand Down

0 comments on commit 8d62b96

Please sign in to comment.