Update Dockerfile
Browse files- Dockerfile +29 -19
Dockerfile
CHANGED
|
@@ -1,50 +1,60 @@
|
|
| 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
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
| 27 |
WORKDIR $HOME/app
|
| 28 |
|
| 29 |
-
# Oh My Zsh এবং
|
| 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
|
| 32 |
-
&& git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
|
| 33 |
|
| 34 |
-
#
|
| 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 '
|
| 38 |
-
&& echo '
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 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 |
|
|
|
|
| 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 |
+
# রুট ইউজার হিসেবে Hacker Tools এবং ডিপেন্ডেন্সি ইন্সটল
|
| 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 neofetch cmatrix \
|
|
|
|
|
|
|
| 12 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# ওয়েব টার্মিনাল (ttyd) সেটআপ
|
| 15 |
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd \
|
| 16 |
&& chmod +x /usr/local/bin/ttyd
|
| 17 |
|
| 18 |
+
# ইউজার তৈরি এবং sudo পারমিশন দেওয়া
|
| 19 |
RUN useradd -m -s /bin/zsh -u 1000 user \
|
| 20 |
&& echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 21 |
|
| 22 |
USER user
|
| 23 |
ENV HOME=/home/user
|
| 24 |
+
|
| 25 |
+
# PATH Warning সমাধানের জন্য লোকাল বিন এবং গেমস ডিরেক্টরি PATH-এ যুক্ত করা হলো (lolcat, figlet এর জন্য)
|
| 26 |
+
ENV PATH="/home/user/.local/bin:/usr/games:${PATH}"
|
| 27 |
+
|
| 28 |
WORKDIR $HOME/app
|
| 29 |
|
| 30 |
+
# Oh My Zsh এবং Hacker Plugins (Auto-suggestions & Syntax Highlighting) ইন্সটল
|
| 31 |
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \
|
| 32 |
+
&& git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions \
|
| 33 |
+
&& git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
| 34 |
|
| 35 |
+
# Zsh কনফিগারেশন আপডেট: Theme, Plugins এবং Banner সেটআপ
|
| 36 |
RUN sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="ys"/g' ~/.zshrc \
|
| 37 |
&& sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/g' ~/.zshrc \
|
| 38 |
+
&& echo 'clear' >> ~/.zshrc \
|
| 39 |
+
&& echo 'figlet -f slant "RAW SYSTEM" | lolcat' >> ~/.zshrc \
|
| 40 |
+
&& echo 'neofetch' >> ~/.zshrc \
|
| 41 |
+
&& echo 'alias matrix="cmatrix -b"' >> ~/.zshrc
|
| 42 |
+
|
| 43 |
+
# Tmux Hacker Style Status Bar কনফিগারেশন
|
| 44 |
+
RUN echo 'set -g default-terminal "screen-256color"' > ~/.tmux.conf \
|
| 45 |
+
&& echo 'set -g status-bg "#000000"' >> ~/.tmux.conf \
|
| 46 |
+
&& echo 'set -g status-fg "#00FF00"' >> ~/.tmux.conf \
|
| 47 |
+
&& echo 'set -g status-left-length 40' >> ~/.tmux.conf \
|
| 48 |
+
&& echo 'set -g status-left "#[fg=#00FF00,bold] 👽 RAW SYSTEM [#S] "' >> ~/.tmux.conf \
|
| 49 |
+
&& echo 'set -g status-right "#[fg=#00FFFF]%d-%b-%Y #[fg=#FF00FF]%H:%M:%S "' >> ~/.tmux.conf \
|
| 50 |
+
&& echo 'set -g window-status-current-format "#[fg=#000000,bg=#00FF00,bold] #I:#W "' >> ~/.tmux.conf \
|
| 51 |
+
&& echo 'set -g window-status-format " #[fg=#00FF00]#I:#W "' >> ~/.tmux.conf
|
| 52 |
+
|
| 53 |
+
# প্রজেক্টের ফাইলগুলো ইউজারের পারমিশন সহ কপি করা হলো
|
| 54 |
COPY --chown=user:user . $HOME/app
|
| 55 |
|
| 56 |
# requirements.txt ইন্সটল
|
| 57 |
+
RUN grep -q '[a-zA-Z]' requirements.txt && pip3 install --no-cache-dir -r requirements.txt || echo "No python packages to install."
|
| 58 |
|
| 59 |
EXPOSE 7860
|
| 60 |
|