Open jamesmfriedman opened 5 years ago
try this
CMD [ "sh", "-c", "java -Dserver.port=$PORT -Xmx300m -Xss512k -Dfile.encoding=UTF-8 -Dspring.profiles.active=prod -Djava.security.egd=file:/dev/./urandom -jar /opt/application.jar" ]
@ncc0706 They fixed this a while back, you can just use the PORT env variable now.
Heroku automatically exposes the containers internal port as
$PORT
. Looking a bit into the issue, it seems like SpringBoot and Heroku can be made to work together with the following command?I'm a bit new to Docker and have never touched Java. Would this go into the
cmd
part of the dockerfile?I know I can't build a Docker image myself. I'd really prefer to be able to deploy on Heroku since thats where the rest of our tech stack currently is. I have a demo license that expires in 16 days so I'd love to see if there is a simple fix to this.