FROM localhost:5000/sec # USER root RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get --no-install-recommends install -y openssh-server net-tools curl tcpdump shorewall sudo vim nmap dnsutils iputils-ping iptables wget python RUN apt-get autoremove --purge && apt clean RUN rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/run/sshd RUN echo 'root:pass' | chpasswd RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config # # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd # ENV NOTVISIBLE "in users profile" RUN echo "export VISIBLE=now" >> /etc/profile #RUN wget -k https://raw.githubusercontent.com/egalpin/apt-vim/master/install.sh # # # COPY sec_bootstrap /usr/bin COPY get_hosts /usr/bin COPY auto_update_hosts /usr/bin RUN mkdir -p /etc/shorewall COPY shorewall /etc/shorewall RUN mkdir -p /etc/opt RUN mkdir -p /project WORKDIR /project COPY install-vim-plugin.sh . #RUN bash ./install-vim-plugin.sh #RUN apt-vim install -y https://github.com/scrooloose/nerdtree.git RUN grep -qw ^docker /etc/passwd || useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo COPY .vimrc /home/docker USER docker