From acc971d064a184abb5ecc5a7be4826b41f5b8271 Mon Sep 17 00:00:00 2001 From: Mohammad al Shakoush Date: Wed, 10 Apr 2024 19:39:21 +0200 Subject: [PATCH] Dockerized the application --- .dockerignore | 2 ++ Dockerfile | 22 ++++++++++++++++++++++ README.md | 14 ++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..91ab857 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +*.gif +*.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b1d400c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:22.04 + +# Set the working directory +WORKDIR /home/ + + +# Non-interactive mode for apt-get +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get install -y build-essential + +# ffmpeg , ffprobe +RUN apt-get install -y ffmpeg + +COPY . / + +RUN cc /src/*.c -lm -O3 -o /file2video + +# Entry point is the executable, file2video. All args are passed to the executable +ENTRYPOINT [ "/file2video" ] \ No newline at end of file diff --git a/README.md b/README.md index ca27e4d..210c9c0 100644 --- a/README.md +++ b/README.md @@ -107,4 +107,18 @@ yt-dlp -f 247 -o isg-video.webm 'https://www.youtube.com/watch?v=8I4fd_Sap-g' # Encode file.bin and merge it with video.mp4 to generate # video-out.mp4 ./embed.sh file.bin video.mp4 video-out.mp4 +``` + +## Docker + +A Dockerfile is provided for building and running bin2video in a container. To build the image: + +```bash +docker build -t bin2video . +``` + +To run bin2video in a container: + +```bash +docker run -it --rm bin2video [options] ``` \ No newline at end of file