dockeralpine-linuxhandbrake

How to install HandBrakeCLI in Docker Alpine container?


I'm trying to install HandBrakeCLI in a Docker container.

In my Dockerfile I have:

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add  --no-cache handbrake

I get the following error:

fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  so:libx265.so.169 (missing):
    required by: handbrake-1.2.2-r1[so:libx265.so.169]
ERROR: Service 'app' failed to build: The command '/bin/sh -c apk add  --no-cache handbrake' returned a non-zero code: 2

I have searched for a while on how to get libx265 but nothing has worked. Any ideas?


Solution

  • You are not following the correct syntax to add a package from edge or testing branch.

    FROM alpine:edge
    RUN apk update && apk add --no-cache handbrake --repository="http://dl-cdn.alpinelinux.org/alpine/edge/testing"