From 4394e58cd3757b452c4c8c5cd0431b0213662fc3 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Sat, 1 May 2021 18:21:39 +0200 Subject: [PATCH] make images even smaller by copying only required folders instead of all (.git,...) --- .dockerignore | 25 +------------------------ Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/.dockerignore b/.dockerignore index 8116b73..a6766a5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,28 +1,5 @@ -# Logs -logs - -# Tests -tests - -# Examples -examples - -# Docs -docs - -# Certs -certs - -.coverage - # Markdown *.md # Other -*.yml - -# Github -.github - -# Python virtual environment -venv \ No newline at end of file +*.yml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5e9a542..912db45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,10 @@ COPY requirements.txt /requirements.txt # install required python packages RUN pip3 install -r requirements.txt -COPY . /bumper - WORKDIR /bumper +# Copy only required folders instead of all +COPY create_certs/ create_certs/ +COPY bumper/ bumper/ + ENTRYPOINT ["python3", "-m", "bumper"]