Skip to content

Commit

Permalink
add baseimage acars-decoder-soapy
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Jan 10, 2025
1 parent 2c0621d commit bd4a6c6
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy_ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,57 @@ jobs:
tags: ghcr.io/sdr-enthusiasts/docker-baseimage:acars-decoder
labels: ${{ steps.meta.outputs.labels }}

deploy_ghcr_acars-decoder-soapy:
name: Deploy acars-decoder-soapy to ghcr.io
runs-on: ubuntu-latest
needs: [deploy_soapy-full]
permissions:
contents: read
packages: write

steps:
# Check out our code
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 2

# Log into ghcr (so we can push images)
- name: Login to ghcr.io
uses: docker/login-action@v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Get metadata from repo
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.6.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Set up QEMU for multi-arch builds
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0

# Set up buildx for multi platform builds
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3.8.0

# Build & Push Dockerfile.acars (only push if this action was NOT triggered by a PR)
- name: Build & Push ghcr.io/sdr-enthusiasts/docker-baseimage:acars-decoder-soapy
uses: docker/build-push-action@v6.10.0
with:
context: .
file: ./Dockerfile.acars-decoder-soapy
no-cache: true
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/sdr-enthusiasts/docker-baseimage:acars-decoder-soapy
labels: ${{ steps.meta.outputs.labels }}

deploy_soapyrtlsdr:
name: Deploy soapyrtlsdr to ghcr.io
needs: [deploy_ghcr_rtlsdr]
Expand Down
51 changes: 51 additions & 0 deletions Dockerfile.acars-decoder-soapy
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:soapy-full

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008,SC2086,DL3008,SC2039
RUN set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
# Required for building multiple packages.
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(pkg-config) && \
TEMP_PACKAGES+=(cmake) && \
TEMP_PACKAGES+=(git) && \
TEMP_PACKAGES+=(automake) && \
TEMP_PACKAGES+=(autoconf) && \
# required for S6 overlay
# curl kept for healthcheck
# ca-certificates kept for python
TEMP_PACKAGES+=(gnupg2) && \
# packages for libacars
TEMP_PACKAGES+=(zlib1g-dev) && \
TEMP_PACKAGES+=(libxml2-dev) && \
KEPT_PACKAGES+=(zlib1g) && \
KEPT_PACKAGES+=(libxml2) && \
# packages for acarsserv
TEMP_PACKAGES+=(libsqlite3-dev) && \
KEPT_PACKAGES+=(libsqlite3-0) && \
# packages for rewriting the output JSON
KEPT_PACKAGES+=(jq) && \
# install packages
apt-get update && \
apt-get install -y --no-install-recommends \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}"\
&& \
# libacars
git clone https://github.com/szpajder/libacars.git /src/libacars && \
pushd /src/libacars && \
git checkout master && \
git rev-parse HEAD > /CONTAINER_VERSION && \
mkdir build && \
pushd build && \
cmake ../ && \
make && \
make install && \
popd && popd && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh

0 comments on commit bd4a6c6

Please sign in to comment.