From c01966af1eadc5aabf0b92977f42597ddade2efd Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 8 Feb 2022 15:30:02 -0800 Subject: [PATCH] Updating docker file to not cahce pip files --- Dockerfile | 2 +- Dockerfile-test-env | 2 +- helm/values.yaml | 2 +- ...cBook-Pro.local's conflicted copy 2022-02-08).sh | 13 +++++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 test-dragon-bot (Lukes-MacBook-Pro.local's conflicted copy 2022-02-08).sh diff --git a/Dockerfile b/Dockerfile index 3980251d..efe1aac0 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.8 as build ADD app/requirements.txt /requirements.txt -RUN apt-get update && apt-get install -y libmagickwand-dev && pip install -q -r requirements.txt +RUN apt-get update && apt-get install -y libmagickwand-dev && pip install --no-cache-dir -q -r requirements.txt FROM python:3.8-slim RUN apt-get update && apt-get install -y libmagickwand-dev diff --git a/Dockerfile-test-env b/Dockerfile-test-env index 894b8c85..25c8a593 100755 --- a/Dockerfile-test-env +++ b/Dockerfile-test-env @@ -1,6 +1,6 @@ FROM python:3.8 as build ADD app/requirements.txt /requirements.txt -RUN apt-get update && apt-get install -y libmagickwand-dev && pip install -r requirements.txt +RUN apt-get update && apt-get install -y libmagickwand-dev && pip install --no-cache-dir -q -r requirements.txt FROM python:3.8-slim RUN apt-get update && apt-get install -y libmagickwand-dev diff --git a/helm/values.yaml b/helm/values.yaml index ce8d5861..33271038 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -8,7 +8,7 @@ image: repository: ldooks/dragon-bot pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "110" + tag: "117" imagePullSecrets: [] nameOverride: "" diff --git a/test-dragon-bot (Lukes-MacBook-Pro.local's conflicted copy 2022-02-08).sh b/test-dragon-bot (Lukes-MacBook-Pro.local's conflicted copy 2022-02-08).sh new file mode 100644 index 00000000..c9a44067 --- /dev/null +++ b/test-dragon-bot (Lukes-MacBook-Pro.local's conflicted copy 2022-02-08).sh @@ -0,0 +1,13 @@ +# Remove the running container so we cna re-use the container name 'dragon-bot' +printf "\n[-] Formatting code\n" +./format_code.sh +printf "[+] Done\n" + +printf "\n[-] Deleting old dragon-bot container from system\n" +docker rm -f dragon-bot-test +printf "[+] Done\n" + +printf "\n[-] Running dragon bot in test mode\n" +docker build -f ./Dockerfile-test-env -t dragon-bot-test . || exit + +docker run -ti -v $(pwd)/app:/app --rm --name dragon-bot-test -e DRAGON_ENV=test -e token="MzQ1MjkwMTI5OTQ4Mjc4Nzg0.DG5IBw._9umb82PrL22bPe7GjmHClU-NtU" dragon-bot-test sh