Update Dockerfile
Browse files- Dockerfile +22 -27
Dockerfile
CHANGED
|
@@ -1,56 +1,51 @@
|
|
| 1 |
# বেস ইমেজ হিসেবে Ubuntu 22.04 ব্যবহার
|
| 2 |
FROM ubuntu:22.04
|
| 3 |
|
| 4 |
-
#
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
| 7 |
|
| 8 |
-
# রুট ইউজার হিসেবে
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
-
curl \
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
nano \
|
| 15 |
-
vim \
|
| 16 |
-
python3 \
|
| 17 |
-
python3-pip \
|
| 18 |
-
sudo \
|
| 19 |
-
zsh \
|
| 20 |
-
tmux \
|
| 21 |
-
unzip \
|
| 22 |
-
locales \
|
| 23 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
# ওয়েব টার্মিনাল (ttyd) সেটআপ
|
| 26 |
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd \
|
| 27 |
&& chmod +x /usr/local/bin/ttyd
|
| 28 |
|
| 29 |
-
# ইউজার তৈরি
|
| 30 |
RUN useradd -m -s /bin/zsh -u 1000 user \
|
| 31 |
&& echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 32 |
|
| 33 |
USER user
|
| 34 |
ENV HOME=/home/user
|
| 35 |
-
|
| 36 |
-
# PATH Warning সমাধানের জন্য লোকাল বিন ডিরেক্টরি PATH-এ যুক্ত করা হলো
|
| 37 |
ENV PATH="/home/user/.local/bin:${PATH}"
|
| 38 |
-
|
| 39 |
WORKDIR $HOME/app
|
| 40 |
|
| 41 |
-
# Oh My Zsh
|
| 42 |
-
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
#
|
| 45 |
-
RUN
|
| 46 |
|
| 47 |
-
# প্রজেক্ট
|
| 48 |
COPY --chown=user:user . $HOME/app
|
| 49 |
|
| 50 |
-
# requirements.txt
|
| 51 |
-
RUN grep -q '[a-zA-Z]' requirements.txt && pip3 install --no-cache-dir -r requirements.txt || echo "No python packages
|
| 52 |
|
| 53 |
-
# Hugging Face-এর ডিফল্ট পোর্ট
|
| 54 |
EXPOSE 7860
|
| 55 |
|
| 56 |
CMD ["python3", "app.py"]
|
|
|
|
| 1 |
# বেস ইমেজ হিসেবে Ubuntu 22.04 ব্যবহার
|
| 2 |
FROM ubuntu:22.04
|
| 3 |
|
| 4 |
+
# এনভায়রনমেন্ট ভেরিয়েবল সেট করা
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
|
| 7 |
|
| 8 |
+
# রুট ইউজার হিসেবে প্রয়োজনীয় টুলস এবং বিউটিফিকেশন প্যাকেজ ইন্সটল
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
+
curl wget git htop nano vim python3 python3-pip sudo zsh tmux unzip locales \
|
| 11 |
+
figlet lolcat software-properties-common \
|
| 12 |
+
&& add-apt-repository ppa:zhangsongcui3371/fastfetch \
|
| 13 |
+
&& apt-get update && apt-get install -y fastfetch \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
# ওয়েব টার্মিনাল (ttyd) সেটআপ
|
| 17 |
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd \
|
| 18 |
&& chmod +x /usr/local/bin/ttyd
|
| 19 |
|
| 20 |
+
# ইউজার তৈরি এবং পারমিশন
|
| 21 |
RUN useradd -m -s /bin/zsh -u 1000 user \
|
| 22 |
&& echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 23 |
|
| 24 |
USER user
|
| 25 |
ENV HOME=/home/user
|
|
|
|
|
|
|
| 26 |
ENV PATH="/home/user/.local/bin:${PATH}"
|
|
|
|
| 27 |
WORKDIR $HOME/app
|
| 28 |
|
| 29 |
+
# Oh My Zsh এবং প্লাগইন ইন্সটল (Syntax Highlighting & Suggestions)
|
| 30 |
+
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \
|
| 31 |
+
&& git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
|
| 32 |
+
&& git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
| 33 |
+
|
| 34 |
+
# .zshrc কনফিগারেশন - Banner এবং Plugins যুক্ত করা
|
| 35 |
+
RUN sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="ys"/g' ~/.zshrc \
|
| 36 |
+
&& sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/g' ~/.zshrc \
|
| 37 |
+
&& echo 'figlet -f slant "RAW TERMINAL" | lolcat' >> ~/.zshrc \
|
| 38 |
+
&& echo 'fastfetch --logo-type none' >> ~/.zshrc
|
| 39 |
|
| 40 |
+
# Tmux কনফিগারেশন - প্রফেশনাল স্ট্যাটাস বার
|
| 41 |
+
RUN echo 'set -g status-bg black\nset -g status-fg white\nset -g status-left-length 30\nset -g status-left "#[fg=green]Session: #S #[default]"\nset -g status-right "#[fg=yellow]%H:%M:%S #[fg=cyan]%d-%b-%y"' > ~/.tmux.conf
|
| 42 |
|
| 43 |
+
# প্রজেক্ট কপি
|
| 44 |
COPY --chown=user:user . $HOME/app
|
| 45 |
|
| 46 |
+
# requirements.txt ইন্সটল
|
| 47 |
+
RUN grep -q '[a-zA-Z]' requirements.txt && pip3 install --no-cache-dir -r requirements.txt || echo "No python packages."
|
| 48 |
|
|
|
|
| 49 |
EXPOSE 7860
|
| 50 |
|
| 51 |
CMD ["python3", "app.py"]
|