Skip to content

Instantly share code, notes, and snippets.

@lfuelling
Last active February 9, 2017 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfuelling/7ed83b54d151e363dc194fb806bdfe02 to your computer and use it in GitHub Desktop.
Save lfuelling/7ed83b54d151e363dc194fb806bdfe02 to your computer and use it in GitHub Desktop.
dradis-ce Dockerfile (alpha)
FROM ruby:2.2
##
# Docker image for Dradis-ce.
# This is NOT the final version!
##
MAINTAINER Lukas Fülling (lukas@k40s.net)
# Install dependencies using apt
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
echo 'deb http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ stable all' > /etc/apt/sources.list.d/dotdeb.list && \
curl https://www.dotdeb.org/dotdeb.gpg | apt-key add - && \
apt-get update && apt-get -y upgrade && \
apt-get -y install curl git expect pwgen build-essential nodejs sqlite3
RUN npm install -g local-ssl-proxy && \
mkdir /dradis-git && \
cd /dradis-git/ && \
git clone https://github.com/lfuelling/dradis-ce.git server && \
for file in verify reset start; do curl -O https://raw.githubusercontent.com/dradis/meta/master/$file.sh; done && \
chmod +x *.sh && \
cd /dradis-git/server && \
bundle install || ruby bin/setup || true
RUN curl -sL https://gist.githubusercontent.com/lfuelling/7ed83b54d151e363dc194fb806bdfe02/raw/a97e45df6b45a7f63767c071bb48469bfeaa18ed/install.sh | bash -
# Expose port of TLS Proxy
EXPOSE 8443
# Entrypoint
CMD /bin/bash -l -c 'cd /dradis-git/server/ && ls -la && bundle exec bin/rails server -b 127.0.0.1 & local-ssl-proxy --source 8443 --target 3000'
#!/bin/bash
# Had to add this because you can't escape the escape char in a Dockerfile somehow ._.
# Initialize config file, precompile assets and install final missing stuff
cd /dradis-git/
expect -c '
set timeout -1 ;
spawn ./reset.sh;
expect {
"do you want to" { exp_send "y\r" ; exp_continue }
eof
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment