Mount your app at /app and run bundle exec rubocop.
harryuan65/rubocop-docker:latest
- specify image: harryuan65/rubocop-docker
- stage run command
rubocop - done.
docker build . -t lintdocker build --platform linux/amd64 . -t lint- pull the image
- cd inside your project
- run
docker run --rm -v "$PWD:/app" lintin your project's directory. - done.
https://hub.docker.com/repository/docker/harryuan65/rubocop-docker/general