myrfa / spring-boot-docker-example

Spring Boot + Docker exaample

Home Page:https://developer.okta.com/blog/2019/12/27/spring-boot-deploy-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Docker to Your Spring Boot Application

This example app shows how to package a Spring Boot application with Docker. See Add Docker to Your Spring Boot Application to see how it was built.

Prerequisite

Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's REST API and makes it easy for developers to authenticate, manage, and secure users + roles in any application.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadeveloper/spring-boot-docker-example.git

Create a New OIDC App in Okta

If you don't have an Okta developer account, please create one. Then, create a new OIDC app on Okta:

  1. Log in to your developer account, navigate to Applications > Add Application.
  2. Select Web > Next.
  3. Give the application a name
  4. The rest of the default values will work. Click Done.

Configure the Resource Server

You need to add the Client ID and Secret from newly created Okta application, and the Issuer URI from your Okta account to the src/main/resources/application.properties file. To find your Issuer URI, go to API -> Authorizaiton Servers.

okta.oauth2.issuer=https://{yourOktaUrl}/oauth2/default
okta.oauth2.client-id={yourClientId}
okta.oauth2.client-secret={yourClientSecret}

Run the Application

To run the Spring Boot application

./mvnw spring-boot:run

See the [blog post] for details on building the Docker container and managing your configuration.

Help

Please post any questions as comments on the [blog post] or post them to Stack Overflow with the okta tag.

License

Apache 2.0, see LICENSE.

About

Spring Boot + Docker exaample

https://developer.okta.com/blog/2019/12/27/spring-boot-deploy-docker


Languages

Language:Java 91.9%Language:Dockerfile 8.1%