X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3c0b0291d8da98704bc52eef5229776fbcbd00b1..4a43094d88da6b5633507a2894090f9dc21d92df:/Dockerfile?ds=inline diff --git a/Dockerfile b/Dockerfile index 4e72aec8b..fa0ad5960 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,24 @@ # Basic Dockerfile to run cookstyle linting -# run: docker build -t test . -FROM ruby:2.6 +# run: docker build -t chef-test . +FROM ruby:3.1-alpine as build +# Add Gem build requirements +RUN apk add --no-cache build-base + +# Create app directory WORKDIR /app -RUN apt-get update \ - && apt-get install -y --no-install-recommends libssl-dev +# Add Gemfile and Gemfile.lock +ADD Gemfile* ./ -ADD Gemfile* /app/ -RUN gem install bundler --no-document \ +# Install Gems +RUN gem install bundler \ && bundle config build.nokogiri --use-system-libraries \ - && bundle install --jobs $(nproc) --retry 5 + && bundle config --global jobs $(nproc) \ + && bundle install -ADD . /app/ +# Add repo +ADD . . +# Run linting RUN bundle exec cookstyle -f fuubar