-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Dockerfile
41 lines (26 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM ruby:3.0.2-alpine AS builder
LABEL maintainer="WPScan Team <contact@wpscan.com>"
RUN echo "install: --no-document --no-post-install-message\nupdate: --no-document --no-post-install-message" > /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 config force_ruby_platform true && \
bundle config disable_version_check 'true' && \
bundle config without "test development" && \
bundle config path.system 'true' && \
bundle install --gemfile=/wpscan/Gemfile --jobs=8
WORKDIR /wpscan
RUN rake install --trace
# needed so non superusers can read gems
RUN chmod -R a+r /usr/local/bundle
FROM ruby:3.0.2-alpine
LABEL maintainer="WPScan Team <contact@wpscan.com>"
LABEL org.opencontainers.image.source https://github.com/wpscanteam/wpscan
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
WORKDIR /wpscan
USER wpscan
RUN /usr/local/bundle/bin/wpscan --update --verbose
ENTRYPOINT ["/usr/local/bundle/bin/wpscan"]