Skip to content

Commit

Permalink
feat: change to upx compressed ffmpeg and dumb-init
Browse files Browse the repository at this point in the history
- Remove `dumb-init` from the list of installed packages in the Dockerfile
- Update the ffmpeg and ffprobe sources from `mwader/static-ffmpeg:7.0-1` to `ghcr.io/jim60105/static-ffmpeg-upx:7.0-1`
- Add `dumb-init` to the Dockerfile explicitly using a COPY instruction rather than installing as a package

Signed-off-by: 陳鈞 <jim60105@gmail.com>
  • Loading branch information
jim60105 committed May 11, 2024
1 parent 6b6185d commit 75e84ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/v
# https://pillow.readthedocs.io/en/stable/installation/building-from-source.html
libjpeg62-turbo-dev libwebp-dev zlib1g-dev \
libgl1 libglib2.0-0 libgoogle-perftools-dev \
git libglfw3-dev libgles2-mesa-dev pkg-config libcairo2 build-essential \
dumb-init
git libglfw3-dev libgles2-mesa-dev pkg-config libcairo2 build-essential

########################################
# Build stage
Expand Down Expand Up @@ -126,8 +125,11 @@ RUN install -d -m 775 -o $UID -g 0 ${CACHE_HOME} && \
COPY --link --from=ghcr.io/tarampampam/curl:8.7.1 /bin/curl /usr/local/bin/

# ffmpeg
COPY --link --from=mwader/static-ffmpeg:7.0-1 /ffmpeg /usr/local/bin/
COPY --link --from=mwader/static-ffmpeg:7.0-1 /ffprobe /usr/local/bin/
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:7.0-1 /ffmpeg /usr/local/bin/
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:7.0-1 /ffprobe /usr/local/bin/

# dumb-init
COPY --link --from=ghcr.io/jim60105/static-ffmpeg-upx:7.0-1 /dumb-init /usr/bin/

# Copy licenses (OpenShift Policy)
COPY --link --chown=$UID:0 --chmod=775 LICENSE /licenses/Dockerfile.LICENSE
Expand Down

0 comments on commit 75e84ec

Please sign in to comment.