Land #8403, more docker improvements
commit
57dc86bdec
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue