Skip to content

Commit

Permalink
dockerfile: use minimal debian based image
Browse files Browse the repository at this point in the history
*requires further testing and debugging
  • Loading branch information
shaluchan authored Oct 30, 2024
1 parent 2117164 commit eb8e7e4
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
FROM fedora:latest
# Use the latest Debian image
FROM debian:latest

# Install packages
RUN echo "max_parallel_downloads=20" >> /etc/dnf/dnf.conf
RUN dnf install -y python3-devel jq aria2 pv openssl neofetch curl-devel glib-devel openssl-devel python3 curl bash which zip git nano file glib2 \
make g++ wget asciidoc coreutils dnf-plugins-core gh netcat zip unzip p7zip bc
RUN dnf -y copr enable ignatenkobrain/fish
RUN dnf install -y fish bash
RUN dnf upgrade -y
# Set environment variable for non-interactive installs
ENV DEBIAN_FRONTEND=noninteractive

# Use rpmfusion ffmpeg
RUN dnf install -y \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
RUN dnf install -y \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
RUN dnf install -y ffmpeg unrar
RUN dnf clean all
# Update the package list and install required packages
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
jq \
aria2 \
pv \
openssl \
curl \
git \
wget \
unzip \
ffmpeg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Python
RUN python3 -m ensurepip \
&& pip3 install --upgrade pip setuptools \
&& pip3 install wheel telethon \
&& rm -rf /usr/lib/python*/ensurepip && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -rf /root/.cache
# Python packages
RUN python3 -m pip install --upgrade pip setuptools wheel \
&& pip install telethon speedtest-cli pycryptodome docopt

# PIP
RUN pip3 install speedtest-cli pycryptodome docopt
RUN pip3 install git+https://github.com/nlscc/samloader.git
RUN pip3 install --upgrade pycryptodome git+https://github.com/R0rt1z2/realme-ota
# Set working directory
WORKDIR /app
RUN chmod 777 /app

# Copy all files to workdir
# Copy all files to the workdir
COPY . .
CMD ["bash","tgbot.sh"]

# Default command
CMD ["bash", "tgbot.sh"]

0 comments on commit eb8e7e4

Please sign in to comment.