From b7e542ebe6ffa7f7e09273c1654929dca2cca43f Mon Sep 17 00:00:00 2001 From: il-katta Date: Fri, 7 Apr 2023 14:31:31 +0200 Subject: [PATCH] reduce docker image size --- Dockerfile | 8 +++++--- docker-compose.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fd9f36e1..fb8f952a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,15 @@ ENV PIP_NO_CACHE_DIR=off ENV PIP_DISABLE_PIP_VERSION_CHECK=on ENV PIP_DEFAULT_TIMEOUT=100 -RUN apt-get update -RUN apt-get install -y python3 python3-pip python-dev build-essential python3-venv ffmpeg +RUN set -x && \ + apt-get -qq update && \ + apt-get -qq install -y build-essential ffmpeg && \ + rm -rf /var/lib/apt/lists/* RUN mkdir -p /code ADD . /code WORKDIR /code -RUN pip3 install -r requirements.txt +RUN pip install -r requirements.txt CMD ["bash"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index e8dee97b3..ea2246390 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: chatgpt_telegram_bot: container_name: chatgpt_telegram_bot - command: python3 bot/bot.py + command: python bot/bot.py restart: always build: context: "."