-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockerfile: use minimal debian based image
*requires further testing and debugging
- Loading branch information
Showing
1 changed file
with
26 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |