-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.uhf
More file actions
63 lines (57 loc) · 2.19 KB
/
Copy pathDockerfile.uhf
File metadata and controls
63 lines (57 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Final image on Ubuntu 25.04
FROM ubuntu:25.04
# Install all build dependencies including Comskip requirements
RUN apt-get update -o Acquire::Check-Valid-Until=false \
&& apt-get install -y --no-install-recommends \
ca-certificates git curl bash unzip ffmpeg \
build-essential autoconf automake libtool \
libargtable2-dev pkg-config libsdl2-dev \
libavcodec-dev libavformat-dev libavfilter-dev libavutil-dev \
libavdevice-dev libjansson-dev \
&& rm -rf /var/lib/apt/lists/*
# Build and install Comskip from source
RUN cd /tmp \
&& git clone --depth 1 https://github.com/erikkaashoek/Comskip.git \
&& cd Comskip \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& cd / \
&& rm -rf /tmp/Comskip
# Install UHF server with specific version
ARG TARGETARCH
ARG UHF_VERSION
RUN REPO="swapplications/uhf-server-dist" \
&& INSTALL_DIR="/opt/uhf-server" \
&& BIN_NAME="uhf-server" \
&& ARCH="$TARGETARCH" \
&& if [ "$ARCH" = "amd64" ]; then \
PLATFORM="x64"; \
elif [ "$ARCH" = "arm64" ]; then \
PLATFORM="arm64"; \
else \
echo "❌ Unsupported architecture: $ARCH" && exit 1; \
fi \
&& echo "🔖 Installing version: $UHF_VERSION" \
&& ASSET_FILENAME="UHF.Server-linux-${PLATFORM}-${UHF_VERSION}.zip" \
&& ASSET_URL="https://github.com/$REPO/releases/download/${UHF_VERSION}/${ASSET_FILENAME}" \
&& echo "📥 Downloading from: $ASSET_URL" \
&& TMP_DIR=$(mktemp -d) \
&& curl -L "$ASSET_URL" -o "$TMP_DIR/uhf-server.zip" \
&& echo "📦 Unzipping..." \
&& unzip -q "$TMP_DIR/uhf-server.zip" -d "$TMP_DIR/extracted" \
&& echo "🚚 Installing to $INSTALL_DIR..." \
&& rm -rf "$INSTALL_DIR" \
&& mkdir -p "$INSTALL_DIR" \
&& cp -r "$TMP_DIR/extracted/"* "$INSTALL_DIR" \
&& ln -sf "$INSTALL_DIR/$BIN_NAME" /usr/local/bin/$BIN_NAME \
&& chmod +x "$INSTALL_DIR/$BIN_NAME" \
&& rm -rf "$TMP_DIR" \
&& echo "✅ UHF Server $UHF_VERSION installed successfully!"
# Create directory for recordings and database
RUN mkdir -p /var/lib/uhf-server/recordings
# Set working directory
WORKDIR /var/lib/uhf-server
# Start bash
CMD ["bash"]