Creates a new and optimized server image.

Usage:

kc.sh build [OPTIONS]

Creates a new and optimized server image based on the configuration options
passed to this command. Once created, the configuration will be persisted and
read during startup without having to pass them over again.

Consider running this command before running the server in production for an
optimal runtime.

Options:

-h, --help           This help message.
--help-all           This same help message but with additional options.
-v, --verbose        Print out error details when running this command.

Database:

--db <vendor>        The database vendor. Possible values are: dev-file, dev-mem, mariadb, mssql,
                       mysql, oracle, postgres. Default: dev-file.
--db-driver <driver> The fully qualified class name of the JDBC driver. If not set, a default
                       driver is set accordingly to the chosen database.

Transaction:

--transaction-xa-enabled <true|false>
                     If set to true, XA datasources will be used. Default: false.

Feature:

--features <feature> Enables a set of one or more features. Possible values are: <...>.
--features-disabled <feature>
                     Disables a set of one or more features. Possible values are: <...>.

HTTP(S):

--http-relative-path <path>
                     Set the path relative to '/' for serving resources. The path must start with a
                       '/'. Default: /.
--https-client-auth <auth>
                     Configures the server to require/request client authentication. Possible
                       values are: none, request, required. Default: none.

Health:

--health-enabled <true|false>
                     If the server should expose health check endpoints. If enabled, health checks
                       are available at the '/health', '/health/ready' and '/health/live'
                       endpoints. Default: false.

Management:

--http-management-relative-path <path>
                     Set the path relative to '/' for serving resources from management interface.
                       The path must start with a '/'. If not given, the value is inherited from
                       HTTP options. Default: /. Available only when Management interface is
                       enabled.
--https-management-client-auth <auth>
                     Configures the management interface to require/request client authentication.
                       If not given, the value is inherited from HTTP options. Possible values are:
                       none, request, required. Default: none. Available only when Management
                       interface is enabled.
--legacy-observability-interface <true|false>
                     DEPRECATED. If metrics/health endpoints should be exposed on the main HTTP
                       server (not recommended). If set to true, the management interface is
                       disabled. Default: false.

Metrics:

--metrics-enabled <true|false>
                     If the server should expose metrics. If enabled, metrics are available at the
                       '/metrics' endpoint. Default: false.

Vault:

--vault <provider>   Enables a vault provider. Possible values are: file, keystore.

Security:

--fips-mode <mode>   Sets the FIPS mode. If 'non-strict' is set, FIPS is enabled but on
                       non-approved mode. For full FIPS compliance, set 'strict' to run on approved
                       mode. This option defaults to 'disabled' when 'fips' feature is disabled,
                       which is by default. This option defaults to 'non-strict' when 'fips'
                       feature is enabled. Possible values are: non-strict, strict. Default:
                       disabled.

Examples:

  Change the database vendor:

      $ kc.sh build --db=postgres

  Enable a feature:

      $ kc.sh build --features=<feature_name>

  Or alternatively, enable all tech preview features:

      $ kc.sh build --features=preview

  Enable health endpoints:

      $ kc.sh build --health-enabled=true

  Enable metrics endpoints:

      $ kc.sh build --metrics-enabled=true

  Change the relative path:

      $ kc.sh build --http-relative-path=/auth
