Ruby lint and rubocop dockerfile issues

I am trying to create single image for checking lint,rubocop and bundle-audit for the repository.

FROM ruby:2.5.0-alpine3.7
RUN apk add --no-cache git && \
apk add --no-cache build-base &&
apk --no-cache add curl && rm -rf /var/cache/apk/*
RUN gem install rubocop rubocop-rspec brakeman bundler-audit bundler

when I am trying to run the image got this error.

docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused “exec: “bash”: executable file not found in $PATH”: unknown

Can any one help me to resolve this.

The alpine based images do not have bash installed. You can use sh or you will have to install bash in your Dockerfile (apk add bash).