FROM ruby:2.6.2-alpine3.9 AS builder LABEL maintainer="WPScan Team " ARG BUNDLER_ARGS="--jobs=8 --without test development" RUN echo "gem: --no-ri --no-rdoc" > /etc/gemrc COPY . /wpscan RUN apk add --no-cache git libcurl ruby-dev libffi-dev make gcc musl-dev zlib-dev procps sqlite-dev && \ bundle install --system --clean --no-cache --gemfile=/wpscan/Gemfile $BUNDLER_ARGS && \ # temp fix for https://github.com/bundler/bundler/issues/6680 rm -rf /usr/local/bundle/cache WORKDIR /wpscan RUN rake install --trace # needed so non superusers can read gems RUN chmod -R a+r /usr/local/bundle FROM ruby:2.6.2-alpine3.9 LABEL maintainer="WPScan Team " RUN adduser -h /wpscan -g WPScan -D wpscan COPY --from=builder /usr/local/bundle /usr/local/bundle RUN chown -R wpscan:wpscan /wpscan # runtime dependencies RUN apk add --no-cache libcurl procps sqlite-libs USER wpscan RUN /usr/local/bundle/bin/wpscan --update --verbose ENTRYPOINT ["/usr/local/bundle/bin/wpscan"] CMD ["--help"]