Just reduce the number of layers
All checks were successful
Build and Publish / build_and_publish (push) Successful in 4m34s

This commit is contained in:
Nexus 2024-07-01 18:56:18 +01:00
parent 0d470fb857
commit 26480d73ba
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1,78 +1,68 @@
FROM python:3.12 FROM python:3.12-slim
LABEL org.opencontainers.image.source https://git.i-am.nexus/nex/college-bot-v2 LABEL org.opencontainers.image.source="https://git.i-am.nexus/nex/college-bot-v2"
LABEL org.opencontainers.image.url https://git.i-am.nexus/nex/college-bot-v2 LABEL org.opencontainers.image.url="https://git.i-am.nexus/nex/college-bot-v2"
LABEL org.opencontainers.image.licenses AGPL-3.0 LABEL org.opencontainers.image.licenses="AGPL-3.0"
LABEL org.opencontainers.image.title "College Bot v2" LABEL org.opencontainers.image.title="College Bot v2"
LABEL org.opencontainers.image.description "Version 2 of jimmy." LABEL org.opencontainers.image.description="Version 2 of jimmy."
WORKDIR /app WORKDIR /app
RUN DEBIAN_FRONTEND=noninteractive apt-get update
# Install chrome dependencies # Install chrome dependencies
#RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
#webext-ublock-origin-chromium \ webext-ublock-origin-chromium \
#gconf-service \ gconf-service \
#libasound2 \ libasound2 \
#libatk1.0-0 \ libatk1.0-0 \
#libc6 \ libc6 \
#libcairo2 \ libcairo2 \
#libcups2 \ libcups2 \
#libdbus-1-3 \ libdbus-1-3 \
#libexpat1 \ libexpat1 \
#libfontconfig1 \ libfontconfig1 \
#libgcc1 \ libgcc1 \
#libgconf-2-4 \ libgconf-2-4 \
#libgdk-pixbuf2.0-0 \ libgdk-pixbuf2.0-0 \
#libglib2.0-0 \ libglib2.0-0 \
#libgtk-3-0 \ libgtk-3-0 \
#libnspr4 \ libnspr4 \
#libpango-1.0-0 \ libpango-1.0-0 \
#libpangocairo-1.0-0 \ libpangocairo-1.0-0 \
#libstdc++6 \ libstdc++6 \
#libx11-6 \ libx11-6 \
#libx11-xcb1 \ libx11-xcb1 \
#libxcb1 \ libxcb1 \
#libxcomposite1 \ libxcomposite1 \
#libxcursor1 \ libxcursor1 \
#libxdamage1 \ libxdamage1 \
#libxext6 \ libxext6 \
#libxfixes3 \ libxfixes3 \
#libxi6 \ libxi6 \
#libxrandr2 \ libxrandr2 \
#libxrender1 \ libxrender1 \
#libxss1 \ libxss1 \
#libxtst6 \ libxtst6 \
#ca-certificates \ ca-certificates \
#fonts-liberation \ fonts-liberation \
#libappindicator1 \ libappindicator1 \
#libnss3 \ libnss3 \
#lsb-release \ lsb-release \
#xdg-utils xdg-utils \
# chromium-common \
#RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ chromium-driver \
# chromium-common \ chromium-sandbox \
# chromium-driver \ traceroute \
# chromium-sandbox iputils-ping \
dnsutils \
# Install general utilities net-tools \
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ git \
traceroute \ whois \
iputils-ping \ curl \
dnsutils \ libmagic-dev
net-tools \
git \
whois \
curl \
libmagic-dev
RUN python3 -m venv /app/venv
RUN /app/venv/bin/pip install --upgrade --no-input pip wheel setuptools
COPY requirements.txt /tmp/requirements.txt COPY requirements.txt /tmp/requirements.txt
RUN /app/venv/bin/pip install -Ur /tmp/requirements.txt --no-input RUN pip install -Ur /tmp/requirements.txt --no-input
COPY ./src/ /app/ COPY ./src/ /app/
CMD ["/app/venv/bin/python", "main.py"] CMD ["python", "main.py"]