Land #8403, more docker improvements

bug/bundler_fix
Christian Mehlmauer 2017-05-18 13:01:41 +02:00
commit 57dc86bdec
No known key found for this signature in database
GPG Key ID: DCF54A05D6E62591
2 changed files with 6 additions and 2 deletions

View File

@ -1,9 +1,10 @@
FROM ruby:2.3-alpine
FROM ruby:2.4.1-alpine
MAINTAINER Rapid7
ARG BUNDLER_ARGS="--jobs=8 --without development test coverage"
ENV APP_HOME /usr/src/metasploit-framework/
ENV MSF_USER msf
ENV NMAP_PRIVILEGED=""
WORKDIR $APP_HOME
COPY Gemfile* m* Rakefile $APP_HOME
@ -13,6 +14,8 @@ RUN apk update && \
apk add \
sqlite-libs \
nmap \
nmap-scripts \
nmap-nselibs \
postgresql-libs \
# needed as long as metasploit-framework.gemspec contains a 'git ls'
git \
@ -46,6 +49,7 @@ RUN chmod o+r /usr/local/bundle/gems/robots-*/lib/robots.rb
RUN adduser -g msfconsole -D $MSF_USER
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip /usr/bin/nmap
USER $MSF_USER

View File

@ -6,5 +6,5 @@ else
lhost = %x(hostname -i)
end
run_single("setg LHOST #{lhost}")
run_single("db_connect #{ENV['DATABASE_URL'].gsub('postrgres://', '')}") if ENV['DATABASE_URL']
run_single("db_connect #{ENV['DATABASE_URL']}") if ENV['DATABASE_URL']
</ruby>