How to setup docker file

bhavit1008TRIAL

6 months ago

I am new to devops stage and dont know how to configure my docker file
https://github.com/Bhavit1008/mongo-server/blob/master/Dockerfile

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies

6 months ago

Hello,

Perhaps this docs section could help you? -

https://docs.railway.com/guides/spring-boot#use-a-dockerfile

In your Dockerfile, it looks like you are copying in the already built jar file, you should have the target folder in the .gitignore and removed from the repo, and then as shown in the above Dockerfile, build the jar file from within the Dockerfile and run it via CMD.