Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@ jobs:
choco install -y --no-progress gstreamer --version=1.20.0
choco install -y --no-progress gstreamer-devel --version=1.20.0
echo "Updating Cargo environment"
echo "C:\gstreamer\1.0\x86_64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "c:\gstreamer\1.0\msvc_x86_64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "GSTREAMER_1_0_ROOT_X86_64=C:\gstreamer\1.0\x86_64\" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
refreshenv
if (Test-Path -Path 'C:\gstreamer\1.0\msvc_x86_64\' -PathType Container) {
$env:GSTREAMER_1_0_ROOT_MSVC_X86_64='C:\gstreamer\1.0\msvc_x86_64\'
} elseif (Test-Path -Path 'D:\gstreamer\1.0\msvc_x86_64\' -PathType Container) {
$env:GSTREAMER_1_0_ROOT_MSVC_X86_64='D:\gstreamer\1.0\msvc_x86_64\'
} else {
throw "Cannot find gstreamer path"
}
echo "GSTREAMER_1_0_ROOT_MSVC_X86_64=$env:GSTREAMER_1_0_ROOT_MSVC_X86_64"
echo "GSTREAMER_1_0_ROOT_MSVC_X86_64=$env:GSTREAMER_1_0_ROOT_MSVC_X86_64" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$env:GSTREAMER_1_0_ROOT_MSVC_X86_64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- if: runner.os == 'macOS'
name: Install Gstreamer on macOS
run: |
Expand Down
49 changes: 23 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Neolink Docker image build scripts
# Copyright (c) 2020 George Hilliard
# Copyright (c) 2020 George Hilliard,
# Andrew King,
# Miroslav Šedivý
# SPDX-License-Identifier: AGPL-3.0-only

FROM docker.io/rust:1-alpine AS build
MAINTAINER thirtythreeforty@gmail.com
FROM docker.io/rust:slim-buster AS build
LABEL authours="George Hilliard <thirtythreeforty@gmail.com>"

# Until Alpine merges gst-rtsp-server into a release, pull all Gstreamer packages
# from the "testing" release
RUN apk add --no-cache \
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
gst-rtsp-server-dev
RUN apk add --no-cache musl-dev gcc

# Use static linking to work around https://github.com/rust-lang/rust/pull/58575
ENV RUSTFLAGS='-C target-feature=-crt-static'
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libgstrtspserver-1.0-dev \
libgstreamer1.0-dev \
libgtk2.0-dev \
libglib2.0-dev && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/local/src/neolink

Expand All @@ -23,19 +24,15 @@ COPY . /usr/local/src/neolink
RUN cargo build --release

# Create the release container. Match the base OS used to build
FROM docker.io/alpine:latest

RUN apk add --no-cache \
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
libgcc \
tzdata \
gstreamer \
gst-plugins-base \
gst-plugins-good \
gst-plugins-bad \
gst-plugins-ugly \
gst-rtsp-server
FROM debian:buster-slim

RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgstrtspserver-1.0-0 \
libgstreamer1.0-0 \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*

COPY --from=build \
/usr/local/src/neolink/target/release/neolink \
Expand Down
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
exit_func() {
exit 1
}
trap exit_func SIGTERM SIGINT
trap exit_func TERM INT

"$@"