Skip to content

Commit

Permalink
feat: DOCKEFILE updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero6992 committed Mar 8, 2024
1 parent 156c032 commit 11edfc2
Showing 1 changed file with 8 additions and 33 deletions.
41 changes: 8 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,13 @@
FROM python:3.10-bullseye
FROM python:3.10.2-slim

ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y \
build-essential \
libcairo2-dev \
cargo \
libfreetype6-dev \
gcc \
libgdk-pixbuf2.0-dev \
gettext \
libjpeg-dev \
liblcms2-dev \
libffi-dev \
musl-dev \
libopenjp2-7-dev \
libssl-dev \
libpango1.0-dev \
poppler-utils \
postgresql-client \
libpq-dev \
python3-dev \
rustc \
tcl-dev \
libtiff5-dev \
tk-dev \
zlib1g-dev
WORKDIR /DiscordBot
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup update
COPY . .

RUN pip3 install cryptography
COPY ./ /DiscordBot
WORKDIR /DiscordBot
RUN pip3 install -r requirements.txt
RUN useradd -m discordbot && chown -R discordbot:discordbot /DiscordBot
USER discordbot

CMD ["python3", "main.py"]
CMD ["python3", "main.py"]

0 comments on commit 11edfc2

Please sign in to comment.