I have a local server nodejs repository that I am pushing to Container Registry which in turn triggers a build on DO Apps.
My Dockerfile is not in the root though but under /apps/server/Dockerfile
since I am using Turborepo.
To point this out to DO, I added this file under the root of the repository: /.do/app.yaml
It contains this:
name: <NAME OF MY IMAGE>
services:
- name: <NAME OF MY APP>
type: docker
repository: registry.digitalocean.com/<REGISTRY NAME>/<IMAGE NAME>:latest
dockerfile_path: apps/server/Dockerfile
I can see that the deployment is kicked of when I push to the container repository but it fails immediately:
[server] [2023-05-31 18:34:10] starting container: starting sub-container [yarn workspace @my-server start:prod]: creating process: failed to load /usr/bin/yarn: exec format error
What is going on here? It seems like it is recognizing my Dockerfile under apps/server since it has the right start command: yarn workspace @my-server start:prod
But why is it trying to load yarn from usr/bin/yarn
?
Thanks for any help
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!
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
If I understand this correctly, I think that you’ve combined two separate concepts which might be conflicting:
That way you don’t have to build anything as the image would already be pre-built and available on there.
Let me know if I am missing anything!
Best,
Bobby