Sign inSign up

kalashnikovisme/docker-rubocop

By kalashnikovisme

•Updated over 3 years ago

Image
0

4.6K

kalashnikovisme/docker-rubocop repository overview

⁠Rubocop Runner

Run Rubocop in CI without all the build. This container will take a folder of Ruby code and test it with Rubocop. It was built so that we could build our applications and run Rubocop against them in CI without having to install the rest of our bundle.

⁠Ruby versions

You can find the list of supported ruby versions here⁠.

⁠Usage

Just pull image of your Ruby version

docker pull kalashnikovisme/docker-rubocop:ruby-YOUR_VERSION

Mount your project at /app in the image and let Rubocop run wild:

docker run --rm --volume "$PWD:/app" kalashnikovisme/docker-rubocop

You can also pass any arguments into the container just like running the regular Rubocop binary:

# Only runs lint cops on only the Gemfile
docker run --rm --volume "$PWD:/app" --lint Gemfile

If a .rubocop.yml config file is found in the root of your project, the image will pick it up for the tests.

⁠Build and push your own image

You can build and push your own image.

Just run:

USERNAME=your_name_on_docker_hub_or_another_registry VERSION=3.0.0 make build_and_push

⁠Update all ruby-versions

If you want to upgrade Dockerfile and update all ruby version images.

Just run

USERNAME=your_name_on_docker_hub_or_another_registry ./all_versions.sh

Tag summary

Content type

Image

Digest

sha256:2019b0fb5…

Size

336.9 MB

Last updated

over 3 years ago

docker pull kalashnikovisme/docker-rubocop:ruby-2.6.1