From 20af778fa190476a49d005989bdddcbb422d8fba Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Tue, 2 May 2017 15:37:38 +0200 Subject: [PATCH] fix rspecs --- .gitignore | 1 + Dockerfile | 4 +++- Gemfile.lock | 8 ++++---- bin/rspec | 7 ++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index d1ba9013..0f7866fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.ash_history cache coverage .bundle diff --git a/Dockerfile b/Dockerfile index ec78b27c..0a4b4255 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY Gemfile.lock /wpscan # runtime dependencies RUN apk add --no-cache libcurl procps && \ # build dependencies - apk add --no-cache --virtual build-deps libcurl ruby-dev libffi-dev make gcc musl-dev zlib-dev procps && \ + apk add --no-cache --virtual build-deps alpine-sdk ruby-dev libffi-dev zlib-dev && \ bundle install --system --gemfile=/wpscan/Gemfile $BUNDLER_ARGS && \ apk del --no-cache build-deps @@ -23,5 +23,7 @@ USER wpscan RUN /wpscan/wpscan.rb --update --verbose --no-color +WORKDIR /wpscan + ENTRYPOINT ["/wpscan/wpscan.rb"] CMD ["--help"] diff --git a/Gemfile.lock b/Gemfile.lock index 193aa3d5..ccd33313 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,8 +10,8 @@ GEM ethon (0.10.1) ffi (>= 1.3.0) ffi (1.9.18) - hashdiff (0.3.2) - json (2.0.4) + hashdiff (0.3.4) + json (2.1.0) mini_portile2 (2.1.0) nokogiri (1.7.1) mini_portile2 (~> 2.1.0) @@ -44,7 +44,7 @@ GEM typhoeus (1.1.2) ethon (>= 0.9.0) unicode-display_width (1.1.3) - webmock (3.0.0) + webmock (3.0.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff @@ -66,4 +66,4 @@ DEPENDENCIES yajl-ruby (>= 1.3.0) BUNDLED WITH - 1.14.3 + 1.14.6 diff --git a/bin/rspec b/bin/rspec index e3829331..d8614a43 100755 --- a/bin/rspec +++ b/bin/rspec @@ -10,11 +10,12 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" cd $DIR/../ # always rebuild and include all GEMs -docker build --build-arg "BUNDLER_ARGS=--system --jobs=8" -t wpscan:rspec . +docker build --build-arg "BUNDLER_ARGS=--jobs=8" -t wpscan:rspec . # update all gems (this updates Gemfile.lock on the host) -docker run --rm -u root -v $DIR/../Gemfile.lock:/wpscan/Gemfile.lock --entrypoint "" wpscan:rspec bundle update +# this also needs some build dependencies +docker run --rm -u root -v $DIR/../Gemfile.lock:/wpscan/Gemfile.lock --entrypoint "" wpscan:rspec sh -c 'apk add --no-cache alpine-sdk ruby-dev libffi-dev zlib-dev && bundle update' # rebuild image with latest GEMs -docker build --build-arg "BUNDLER_ARGS=--system --jobs=8" -t wpscan:rspec . +docker build --build-arg "BUNDLER_ARGS=--jobs=8" -t wpscan:rspec . # run spec docker run --rm -v $DIR/../:/wpscan --entrypoint "" wpscan:rspec rspec