forked from SenexCrenshaw/StreamMaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.base
28 lines (23 loc) · 1.28 KB
/
Dockerfile.base
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
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /app
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN \
--mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
apt-get update -yq \
&& apt-get upgrade -yq \
&& apt-get install -yq --no-install-recommends xz-utils gosu postgresql postgresql-common curl gnupg lsb-release \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /docker-entrypoint-initdb.d
RUN if [ "$TARGETARCH" = "arm64" ]; then curl -L -o /tmp/ffmpeg.tar.xz https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linuxarm64-gpl.tar.xz; else curl -L -o /tmp/ffmpeg.tar.xz https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz; fi
RUN mkdir /tmp/ffmpeg/ \
&& tar -Jxvvf /tmp/ffmpeg.tar.xz --strip-components=1 -C /tmp/ffmpeg/ \
&& cp /tmp/ffmpeg/bin/ffmpeg /usr/local/bin/ \
&& cp /tmp/ffmpeg/bin/ffprobe /usr/local/bin/ \
&& chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe \
&& rm -rf /tmp/ffmpeg.tar.xz /tmp/ffmpeg/