Updating docker file to not cahce pip files

This commit is contained in:
Luke Robles 2022-02-08 15:30:02 -08:00
parent 9a4f480c92
commit f0ef748f75
4 changed files with 16 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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: ""

View File

@ -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