Files
ccextractor/docker/README.md
Ishan Grover 34bb9dd20d [FEATURE]: Create Docker image for CCExtractor (#1611)
* docs: Create a README for docker image usage

* docs: Update `COMPILATION.md` for adding docker instruction

* docs: Add detailed docker building & usage guide

* feat: Add dockerfile

* feat: Make dockerfile to build CCExtractor

* fix: dockerfile

* feat: Optimize docker image size

* docs: fix some commands usage

* docs: Mention docker image creation in CHANGES.txt

* docs: Update readme to remove dockerhub method
2024-07-16 20:17:57 -07:00

2.0 KiB

CCExtractor Docker image

This dockerfile prepares a minimalist Docker image with CCExtractor. It compiles CCExtractor from sources following instructions from the Compilation Guide.

You can install the latest build of this image by running docker pull CCExtractor/ccextractor

Build

You can build the Docker image directly from the Dockerfile provided in docker directory of CCExtractor source

$ git clone https://github.com/CCExtractor/ccextractor.git && cd ccextractor
$ cd docker/
$ docker build -t ccextractor .

Usage

The CCExtractor Docker image can be used in several ways, depending on your needs.

# General usage
$ docker run ccextractor:latest <features>
  1. Process a local file & use -o flag

To process a local video file, mount a directory containing the input file inside the container:

# Use `-o` to specifying output file
$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) ccextractor:latest input.mp4 -o output.srt

# Alternatively use `--stdout` feature
$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) ccextractor:latest input.mp4 --stdout > output.srt

Run this command from where your input video file is present, and change input.mp4 & output.srt with the actual name of files.

  1. Enter an interactive environment

If you need to run CCExtractor with additional options or perform other tasks within the container, you can enter an interactive environment: bash

$ docker run --rm -it --entrypoint='sh' ccextractor:latest

This will start a Bash shell inside the container, allowing you to run CCExtractor commands manually or perform other operations.

Example

I run help command in image built from dockerfile

$ docker build -t ccextractor .
$ docker run --rm ccextractor:latest --help

This will show the --help message of CCExtractor tool From there you can see all the features and flags which can be used.