-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Optimize dockerfiles for production images (#4302)
Co-authored-by: Romain Beauxis <[email protected]>
- Loading branch information
1 parent
cde4dad
commit b13bc07
Showing
9 changed files
with
180 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM alpine:edge AS downloader | ||
|
||
ARG APK_FILE | ||
|
||
COPY $APK_FILE /downloads/liquidsoap.apk | ||
|
||
FROM alpine:edge | ||
|
||
RUN --mount=type=bind,from=downloader,source=/downloads,target=/downloads \ | ||
set -eux; \ | ||
echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories; \ | ||
apk add --allow-untrusted --no-cache \ | ||
/downloads/liquidsoap.apk \ | ||
; | ||
|
||
USER liquidsoap | ||
|
||
RUN liquidsoap --cache-stdlib | ||
|
||
ENTRYPOINT ["/usr/bin/liquidsoap"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM debian:12-slim AS downloader | ||
|
||
ARG DEB_FILE | ||
ARG DEB_DEBUG_FILE | ||
COPY $DEB_FILE /downloads/liquidsoap.deb | ||
COPY $DEB_DEBUG_FILE /downloads/liquidsoap-debug.deb | ||
|
||
ARG DEB_MULTIMEDIA_KEYRING="https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2024.9.1_all.deb" | ||
ARG DEB_MULTIMEDIA_KEYRING_SHA256SUM="8dc6cbb266c701cfe58bd1d2eb9fe2245a1d6341c7110cfbfe3a5a975dcf97ca" | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
wget \ | ||
; \ | ||
wget "$DEB_MULTIMEDIA_KEYRING" -O /downloads/deb-multimedia-keyring.deb; \ | ||
echo "$DEB_MULTIMEDIA_KEYRING_SHA256SUM /downloads/deb-multimedia-keyring.deb" | sha256sum -c -; | ||
|
||
FROM debian:12-slim | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# For ffmpeg with libfdk-aac | ||
RUN --mount=type=bind,from=downloader,source=/downloads,target=/downloads \ | ||
set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
/downloads/deb-multimedia-keyring.deb \ | ||
ca-certificates \ | ||
; \ | ||
echo 'deb https://www.deb-multimedia.org bookworm main non-free' > \ | ||
/etc/apt/sources.list.d/deb-multimedia.list; \ | ||
rm -rf \ | ||
/var/lib/apt/lists \ | ||
/var/lib/dpkg/status-old \ | ||
; | ||
|
||
RUN --mount=type=bind,from=downloader,source=/downloads,target=/downloads \ | ||
set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
/downloads/liquidsoap.deb \ | ||
/downloads/liquidsoap-debug.deb \ | ||
; \ | ||
rm -rf \ | ||
/var/lib/apt/lists \ | ||
/var/lib/dpkg/status-old \ | ||
; | ||
|
||
USER liquidsoap | ||
|
||
RUN liquidsoap --cache-stdlib | ||
|
||
ENTRYPOINT ["/usr/bin/liquidsoap"] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters