Question

Building an app with 2 buildpacks in a Dockerfille

Hello, I have an app with 2 buildpacks, one is the nodejs buildpack that compiles the frontend and the other is the ruby buildpack that builds the rails api. Using a droplet with dokku is easy to manage multiple builpdpacks and everything works, but here in the app platform I needed to create a custom Dockerfile do everything manually and I still cannot receive a live App URL and the build executor(kaniko) is very slow even increasing the machine size.


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.

Accepted Answer

With multi-stage builds, you can use multiple FROM statements in your Dockerfile. Each FROM instruction can use a different base, and each of them begins a new stage of the build. You can selectively copy artifacts from one stage to another, leaving behind everything you don’t want in the final image.

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 managed to make it work and the app is live. But, the build is taking around 30 minutes which still is very slow compared with 5 minutes on heroku or dokku in a droplet.