use ruby alpine image from now on

This commit is contained in:
Christian Mehlmauer
2017-04-21 19:40:25 +02:00
parent e186ec7534
commit 67ba526b5b
4 changed files with 42 additions and 37 deletions

View File

@@ -1,20 +1,19 @@
FROM ruby:2.4-slim
FROM ruby:2.4-alpine
MAINTAINER WPScan Team <team@wpscan.org>
ARG BUNDLER_ARGS="--system --jobs=8 --without test"
ARG BUNDLER_ARGS="--jobs=8 --without test"
RUN DEBIAN_FRONTEND=noninteractive && \
rm -rf /var/lib/apt/lists/* && \
apt-get update && \
apt-get --no-install-recommends -qq -y install curl git ca-certificates openssl libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev build-essential procps
RUN useradd -d /wpscan wpscan
RUN adduser -h /wpscan -g WPScan -D wpscan
RUN echo "gem: --no-ri --no-rdoc" > /etc/gemrc
RUN mkdir /wpscan
COPY Gemfile /wpscan
WORKDIR /wpscan
RUN bundle install $BUNDLER_ARGS
# runtime dependecies
RUN apk add --no-cache libcurl procps && \
# build dependecies
apk add --no-cache --virtual build-deps libcurl ruby-dev libffi-dev make gcc musl-dev zlib-dev procps && \
bundle install --system --gemfile=/wpscan/Gemfile $BUNDLER_ARGS && \
apk del --no-cache build-deps
COPY . /wpscan
RUN chown -R wpscan:wpscan /wpscan