From 28bab868af1f4d28f28a4622ab88e45541803481 Mon Sep 17 00:00:00 2001 From: Yoruio Date: Mon, 11 Jul 2022 20:31:54 -0600 Subject: [PATCH] feat: Reduces docker image size Drastically reduces Docker image size by changing from discord.py base image to python base image, reducing number of redundant dependencies downloaded. (Also because migration to discord.py v2) task: none --- Dockerfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4cffba7..8c4f5ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,16 @@ -FROM gorialis/discord.py +FROM python:3.9.1-alpine + +RUN \ + echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ + echo "http://dl-8.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories + +# Install basic dependencies +RUN \ + apk --no-cache add -q git cloc openssl openssl-dev openssh alpine-sdk bash gettext sudo build-base gnupg linux-headers xz + +# install discord.py - this done outside of requirements.txt to lower build times +RUN pip3 install git+https://github.com/Rapptz/discord.py@e0341c9#egg=discord.py + WORKDIR /app COPY . . RUN pip install -Ur requirements.txt