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 yourapplication.yml
file - expose the server port in your
docker-compose.yml
file. As a remember, the syntax ishost:container
, so assuming you configured your Spring Boot application on port443
, and want to expose it to the port8443
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.