Skip to content

Commit 57dc86b

Browse files
committed
Land rapid7#8403, more docker improvements
2 parents c0bf2cc + 5dbbd37 commit 57dc86b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docker/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM ruby:2.3-alpine
1+
FROM ruby:2.4.1-alpine
22
MAINTAINER Rapid7
33

44
ARG BUNDLER_ARGS="--jobs=8 --without development test coverage"
55
ENV APP_HOME /usr/src/metasploit-framework/
66
ENV MSF_USER msf
7+
ENV NMAP_PRIVILEGED=""
78
WORKDIR $APP_HOME
89

910
COPY Gemfile* m* Rakefile $APP_HOME
@@ -13,6 +14,8 @@ RUN apk update && \
1314
apk add \
1415
sqlite-libs \
1516
nmap \
17+
nmap-scripts \
18+
nmap-nselibs \
1619
postgresql-libs \
1720
# needed as long as metasploit-framework.gemspec contains a 'git ls'
1821
git \
@@ -46,6 +49,7 @@ RUN chmod o+r /usr/local/bundle/gems/robots-*/lib/robots.rb
4649
RUN adduser -g msfconsole -D $MSF_USER
4750

4851
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
52+
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip /usr/bin/nmap
4953

5054
USER $MSF_USER
5155

docker/msfconsole.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ else
66
lhost = %x(hostname -i)
77
end
88
run_single("setg LHOST #{lhost}")
9-
run_single("db_connect #{ENV['DATABASE_URL'].gsub('postrgres://', '')}") if ENV['DATABASE_URL']
9+
run_single("db_connect #{ENV['DATABASE_URL']}") if ENV['DATABASE_URL']
1010
</ruby>

0 commit comments

Comments
 (0)