From 3ed18b7f13ae3147087ccf88216e2d7b60d8acca Mon Sep 17 00:00:00 2001 From: Github Date: Wed, 27 Mar 2024 03:16:04 +0000 Subject: [PATCH] Ensure config.ini does not exist in Docker images We want to protect against images being built with credentials baked inside of them. If no config.ini exists we need to skip the rm so that we pass the build step! --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 686f5c6..90a5916 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN pip install --no-cache-dir -r requirements.txt # Doing this after installing the dependencies allows Docker to cache the # installed dependencies separately from your code COPY . . -RUN rm config.ini +RUN if [ -f config.ini ]; then rm config.ini; fi # Set the command to run the bot # The ENTRYPOINT instruction allows the container to be run as an executable