You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

4 years ago
FROM localhost:5000/sec
4 years ago
#
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
4 years ago
RUN mkdir -p /project
4 years ago
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