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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

45 lines
1.1 KiB

FROM phusion/baseimage
MAINTAINER Elbert Alias <elbert@alias.io>
ENV DEBIAN_FRONTEND noninteractive
# Install packages
RUN apt-get update && apt-get install -y nodejs npm
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm install jsonlint -g
# Add user
RUN useradd -ms /bin/bash wappalyzer && echo "wappalyzer:wappalyzer" | chpasswd
RUN echo 'wappalyzer ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
WORKDIR /home/wappalyzer
RUN su wappalyzer -c "mkdir -p synced"
RUN echo "cd /home/wappalyzer/synced" >> .bashrc
RUN echo "export PATH=$PATH:/home/wappalyzer/synced/bin" >> .bashrc
# SSH
RUN rm -f /etc/service/sshd/down
RUN su wappalyzer -c "mkdir .ssh && chmod 700 .ssh"
ADD insecure.key.pub /tmp/insecure.key.pub
RUN su wappalyzer -c "cat /tmp/insecure.key.pub >> .ssh/authorized_keys && chmod 600 .ssh/authorized_keys" && rm -f /tmp/insecure.key.pub
# Fix the `stdin: is not a tty` error in Vagrant
RUN sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile
EXPOSE 22
RUN echo "/usr/sbin/sshd -D" > /etc/my_init.d/sshd.sh
CMD ["/sbin/my_init"]