How to run sidekiq in a separate different docker container apart from application

How to run sidekiq in a separate different docker container apart from application.
We are using whenever for the sidekiq jobs, but the jobs are getting triggered in all web containers

How do we setup the web container (rails app) and the sidekiq workers to scale horizontally as well (preferably as separate containers)

Source: StackOverflow