Hi!
I’m on the App platform, and I try to “Create resource from source code”, and I choose my repository on GitHub, but I get a “no component detected” error.
So I looked around and found this answer saying that you should add a dockerfile. (Here:https://www.digitalocean.com/community/questions/what-are-the-possible-options-for-deploying-my-java-application-to-digitalocean)
I’m doing this for the first time. I don’t know what should go on the dockerfile or where the dockerfile should go! My app is in java, and I’m writing it on Android Studio and storing the code on GitHub.
What should the dockerfile contain? Where should I place it?
Thank you so much 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.
Hey!
Indeed, Java is not a supported buildpack out of the box with the App Platform. You can find a list of all available buildpacks here:
As an alternative option, you could indeed write a Dockerfile with all of the required dependencies for your project and use this instead to deploy your app.
Dockerizing a Java app might differ depending on your app requirements, but it should be more or less the same as described on the Docker website itself:
The
Dockerfile
should be placed at the root of your backend project’s repository.Example
Dockerfile
for a Java application:Hope that this helps!
Best,
Bobby