Question

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

Any suggestions?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I’ve looked into this and it looks like you’ve found a bug in our new support for DOCR registries. I’ve filed a ticket internally and hope to have a fix for this soon. Thanks for reporting this. I will update this thread once the fix has been deployed.