Install HandBrake Inside Docker Container in Linux

Install HandBrake Inside Docker Container in Linux

HandBrake is a tool for converting video files from one format into another. HandBrake is an open-source software that released under the GPLv2 license.

This tutorial explains how to install HandBrake inside a Docker container in the Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install HandBrake

  • Host network

Run the following command to create a container for HandBrake that uses host network:

docker run -d --name=handbrake --restart=always --network=host \
    -v /opt/handbrake/config:/config \
    -v /opt/handbrake/storage:/storage \
    -v /opt/handbrake/watch:/watch \
    -v /opt/handbrake/output:/output \
    jlesage/handbrake
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, HandBrake service is listening on port 5800. It can be changed with -p option.

docker network create app-net
docker run -d --name=handbrake --restart=always --network=app-net \
    -p 8080:5800 \
    -v /opt/handbrake/config:/config \
    -v /opt/handbrake/storage:/storage \
    -v /opt/handbrake/watch:/watch \
    -v /opt/handbrake/output:/output \
    jlesage/handbrake

Testing HandBrake

To access web UI, open a web browser and go to http://<IP_ADDRESS>:5800, where <IP_ADDRESS> is the IP address of the system.

HandBrake Inside Docker Container in Linux

Uninstall HandBrake

To completely remove HandBrake, remove its container:

docker rm --force handbrake

Remove HandBrake image:

docker rmi jlesage/handbrake

You can also remove HandBrake data:

sudo rm -rf /opt/handbrake

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.