From 6cfd188c3be2c40ebc9855fa77bb2f9f30a837f8 Mon Sep 17 00:00:00 2001 From: Paillat Date: Fri, 14 Jul 2023 16:22:53 +0200 Subject: [PATCH] feat: add Dockerfile and docker-compose.yaml for containerization The Dockerfile is added to define the container image for the application. It uses the Python 3.10.0 base image, sets the PYTHONUNBUFFERED environment variable, clones the Vulkan repository, installs the required dependencies, installs ffmpeg, creates a non-root user, and sets the command to run the main.py file. The docker-compose.yaml file is added to define the Docker Compose configuration for the application. It specifies a service named "vulkan" that builds the image using the Dockerfile and uses the .env file for environment variables. --- Dockerfile | 11 +++++++++++ docker-compose.yaml | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6474b4e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.10.0 + +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app +RUN git clone https://github.com/RafaelSolVargas/Vulkan.git /app +RUN pip install -r requirements.txt +RUN apt-get update && apt-get install -y software-properties-common && apt-get install -y ffmpeg +RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app +USER appuser +CMD ["python", "main.py"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..ab3a80c --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,8 @@ +version: '3' +services: + vulkan: + build: + context: . + dockerfile: Dockerfile + env_file: + - .env \ No newline at end of file