Skip to content

Instantly share code, notes, and snippets.

@andrewhampton
Created October 17, 2017 15:10
Show Gist options
  • Save andrewhampton/d78df6952e757fd10384015fdf30a7c4 to your computer and use it in GitHub Desktop.
Save andrewhampton/d78df6952e757fd10384015fdf30a7c4 to your computer and use it in GitHub Desktop.
Dockerfile for bundle-audit
FROM ruby:2.4.1
RUN gem install 'bundle-audit'
ADD Gemfile ./
ADD Gemfile.lock ./
# We never want the `bundle audit update` to be cached. So this will help bust
# the cache if you include this in your build command:
# `--build-arg CACHEBUST=$(date +%s)`
# https://github.com/moby/moby/issues/1996#issuecomment-295683518
ARG CACHEBUST=1
RUN bundle audit update
CMD ["bundle-audit"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment