Error when using run_command with a docker image
I am deploying a Rails app, including a dedicated work to run background jobs. I want to reuse the built Rails container and just change the run time command.
I was expecting the following configuration to work:
worker: - name: resque image: registry_type: DOCR repository: <repository_name> tag: <tag_name> run_command: ./docker/scripts/resque.sh envs: - key: ENV_1 value: Value_1 ...
When I trigger a deployment it fails to run the migrations with the following error:
resque | 12:23:25 starting container: starting non-root container [/cnb/lifecycle/launcher ./docker/scripts/resque.sh]: creating process: failed to load /cnb/lifecycle/launcher: no such file or directory
I have had to resort to having dedicated containers for the Rails app, Resque workers and migrations where the only difference is the runtime command
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×