From 82fe7471c546dbc39894a6dc24c71e0bf56cf709 Mon Sep 17 00:00:00 2001 From: allinoneallinone00 Date: Tue, 23 Apr 2024 19:54:06 +0000 Subject: [PATCH] Delete the apt-get lists after installing, Dockerfile --- .idx/.gitignore | 1 + .idx/dev.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 4 +++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .idx/.gitignore create mode 100644 .idx/dev.nix diff --git a/.idx/.gitignore b/.idx/.gitignore new file mode 100644 index 0000000..8438685 --- /dev/null +++ b/.idx/.gitignore @@ -0,0 +1 @@ +gc/ \ No newline at end of file diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 0000000..57483d9 --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: { + + # Which nixpkgs channel to use. + channel = "stable-23.11"; # or "unstable" + + # Use https://search.nixos.org/packages to find packages + packages = [ + pkgs.docker + pkgs.python3 + ]; + + # Sets environment variables in the workspace + env = { + SOME_ENV_VAR = "hello"; + }; + + # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" + idx.extensions = [ + "ms-azuretools.vscode-docker" + "ms-python.debugpy" + "ms-python.pylint" + "ms-python.python" + ]; + + services.docker.enable = true; + + # Enable previews and customize configuration + idx.previews = { + enable = false; + previews = [ + { + command = [ + "npm" + "run" + "start" + "--" + "--port" + "$PORT" + "--host" + "0.0.0.0" + "--disable-host-check" + ]; + manager = "web"; + id = "web"; + } + ]; + }; +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0bd14e6..1419cc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM python:3.11 WORKDIR /app COPY . /app -RUN apt-get -qq update && apt-get -qq install -y git wget ffmpeg mediainfo +RUN apt-get -qq update && apt-get -qq install -y git wget ffmpeg mediainfo \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN pip install -r requirements.txt CMD ["python", "main.py"]