Commit 21d9ede
Changed files (2)
Dockerfile
@@ -1,11 +1,16 @@
FROM docker:stable
-RUN apk add ruby git curl
-RUN gem install bundler -v '~> 2.0' --no-document
+ENV PACKAGES build-base ruby ruby-dev ruby-json ruby-etc git curl
RUN wget https://github.com/arminc/clair-scanner/releases/download/v12/clair-scanner_linux_amd64 && \
mv clair-scanner_linux_amd64 /usr/local/bin/clair-scanner && \
chmod +x /usr/local/bin/clair-scanner
RUN mkdir -p /examine
WORKDIR /examine
COPY . .
-RUN bundle install --jobs "$(nproc)" --quiet
+RUN apk update && \
+ apk upgrade && \
+ apk add $PACKAGES && \
+ rm -fr /var/cache/apk/* && \
+ gem install bundler:'~> 2.0' --no-document && \
+ bundle install --jobs "$(nproc)" --quiet --path vendor/bundle && \
+ apk del build-base
ENTRYPOINT ["bundle", "exec", "./exe/examine"]
Rakefile
@@ -9,6 +9,6 @@ RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new(:rubocop)
Bundler::Audit::Task.new
-desc "run linters"
+desc 'run linters'
task lint: [:rubocop, 'bundle:audit']
task default: :spec