2024-10-10 09:39:32 +00:00
|
|
|
# Użyj najnowszego obrazu bazowego Debian
|
|
|
|
FROM debian:latest
|
|
|
|
|
|
|
|
# Ustaw zmienną środowiskową DEBIAN_FRONTEND na noninteractive, aby uniknąć interaktywnych promptów podczas instalacji pakietów
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
# Aktualizacja pakietów i instalacja wymaganych narzędzi wraz z python3 i python3-scapy
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
iproute2 \
|
|
|
|
curl \
|
|
|
|
vim \
|
|
|
|
tmux \
|
|
|
|
git \
|
|
|
|
htop \
|
|
|
|
mc \
|
|
|
|
sudo \
|
|
|
|
wget \
|
|
|
|
gnupg \
|
|
|
|
tcpdump \
|
|
|
|
termshark \
|
|
|
|
python3 \
|
|
|
|
python3-scapy \
|
|
|
|
iputils-ping \
|
|
|
|
traceroute \
|
|
|
|
ipcalc
|
|
|
|
|
|
|
|
# Ustawienie hasła dla użytkownika root
|
|
|
|
RUN echo "root:rootpass" | chpasswd
|
|
|
|
|
|
|
|
# Tworzenie nowego użytkownika 'user' z hasłem 'pass' i dodanie do grupy sudo
|
|
|
|
RUN useradd -m -s /bin/bash user && \
|
|
|
|
echo "user:pass" | chpasswd && \
|
|
|
|
usermod -aG sudo user
|
|
|
|
|
|
|
|
# Opcjonalnie: Ustawienie domyślnego użytkownika
|
2024-10-25 12:52:30 +00:00
|
|
|
USER user
|
|
|
|
|
|
|
|
# Install Vim-Plug for Vim plugin management
|
|
|
|
RUN curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
|
|
|
|
|
|
|
|
# Copy the project into the image
|
|
|
|
#COPY --chown=user:user . /home/user/fapi
|
|
|
|
#COPY --chown=user:user ./_confs/* ./
|
|
|
|
COPY ./_confs/* ./
|
|
|
|
|
|
|
|
# Install Vim plugins via Vim-Plug
|
|
|
|
RUN vim +'PlugInstall --sync' +qall
|
|
|
|
|
|
|
|
|
|
|
|
# Set the working directory for installing dependencies
|
|
|
|
WORKDIR /home/user/work
|
2024-10-10 09:39:32 +00:00
|
|
|
|
|
|
|
# Ustawienie domyślnego polecenia
|
|
|
|
CMD ["/bin/bash"]
|
|
|
|
|