HTTPS with Docker Containerised Spring Boot App is not working HTTPS with Docker Containerised Spring Boot App is not working docker docker

HTTPS with Docker Containerised Spring Boot App is not working


In order for this to work on Docker, you need to:

  • start your server with a valid port (by valid, I mean either 443, or another not-reserved port, like 8443 for instance). As you already know, this is done by setting the server.port property in your application.yml file
  • expose the server port in your docker-compose.yml file. As a remember, the syntax is host:container, so assuming you configured your Spring Boot application on port 443, and want to expose it to the port 8443 on the host, you ports configuration will look like: 8443:443

Also, it seems strange to me that you're using both image and build on your docker-compose.yml file.