<commit_before>= APIM Docker Images
:page-sidebar: apim_3_x_sidebar
:page-permalink: apim/3.x/apim_installguide_docker_images.html
:page-folder: apim/installation-guide/docker
:page-layout: apim3x
:docker-image-src: https://raw.githubusercontent.com/gravitee-io/gravitee-docker/master/images
:github-repo: https://github.com/gravitee-io/gravitee-docker
:docker-hub: https://hub.docker.com/r/graviteeio

== Overview

This section explains how to run APIM images in Docker. These procedures are intended for users who are already familiar with Docker.

== Prequisites

To run the official images, you must first install https://docs.docker.com/installation/[Docker, window=\"_blank\"].

== Images

You can find the complete set of APIM images https://hub.docker.com/u/graviteeio/[on Docker Hub, window=\"_blank\"].

|===
|Image name |Version |Base

|{docker-hub}/apim-gateway/[graviteeio/apim-gateway]
|latest
|https://hub.docker.com/_/eclipse-temurin?tab=tags&name=11-jre-focal[eclipse-temurin:11-jre-focal]

|{docker-hub}/apim-management-api/[graviteeio/apim-management-api]
|latest
|https://hub.docker.com/_/eclipse-temurin?tab=tags&name=11-jre-focal[eclipse-temurin:11-jre-focal]

|{docker-hub}/apim-management-ui/[graviteeio/apim-management-ui]
|latest
|https://hub.docker.com/_/nginx?tab=tags&name=1.21-alpine[nginx:1.21-alpine]

|{docker-hub}/apim-portal-ui/[graviteeio/apim-portal-ui]
|latest
|https://hub.docker.com/_/nginx?tab=tags&name=1.21-alpine[nginx:1.21-alpine]

|===


=== APIM Gateway (graviteeio/apim-gateway)

The APIM Gateway image provides a set of environment variables which you can use to tune your container.

MongoDB is the default repository. You can replace the default MongoDB address (`localhost:27017`) with your own (`GRAVITEEIO_MONGODB_HOST:GRAVITEEIO_MONGODB_PORT`).

The APIM Gateway image also uses the Elasticsearch reporter. You can replace the default Elasticsearch address (`localhost:9300`) with another address (`GRAVITEEIO_ELASTIC_HOST:GRAVITEEIO_ELASTIC_PORT`).

==== Run The Image
[source,shell]
....
$ docker run  \
        --publish 82:8082  \
        --name gateway  \
        --detach  \
        graviteeio/apim-gateway:latest
....

==== Configure The Container
If you want to override the default configuration for MongoDB, Elasticsearch and any other properties included in the `gravitee.yml` file,
you need to use environment variables. For more information, see the APIM Gateway link:{{ '/apim/3.x/apim_installguide_gateway_configuration.html#environment_variables' | relative_url }}[configuration] section.

The following example changes the MongoDB connection:
[source,shell]
....
$ docker run  \
        --publish 82:8082  \
        --name gateway  \
        --env GRAVITEE_MANAGEMENT_MONGODB_URI=mongodb://username:password@mongohost:27017/dbname
        --detach  \
        graviteeio/apim-gateway:latest
....

=== APIM API (graviteeio/apim-management-api)

The APIM API image provides a set of environment variables which you can use to tune your container.

MongoDB is our default repository. You can replace the default MongoDB address (`localhost:27017`) by the one you provide (`GRAVITEEIO_MONGODB_HOST:GRAVITEEIO_MONGODB_PORT`).

The Management API image also uses the Elasticsearch reporter. You can replace default Elasticsearch address (`localhost:9300`) by another address (`GRAVITEEIO_ELASTIC_HOST:GRAVITEEIO_ELASTIC_PORT`).

==== Run The Image
[source,shell]
....
$ docker run \
          --publish 81:8083 \
          --name management-api \
          --detach  \
          graviteeio/apim-management-api:latest
....

==== Configure The Container

If you want to override the default configuration for MongoDB, Elasticsearch and any other properties included in the `gravitee.yml` file,
you have to use environment variables. For more information, see the APIM API link:{{ '/apim/3.X/apim_installguide_rest_apis_configuration.html#environment_variables' | relative_url }}[configuration] section.

The following example changes the MongoDB connection:
[source,shell]
....
$ docker run \
          --publish 81:8083 \
          --name management-api \
          --env GRAVITEE_MANAGEMENT_MONGODB_URI=mongodb://username:password@mongohost:27017/dbname
          --detach  \
          graviteeio/apim-management-api:latest
....

=== APIM Console (graviteeio/apim-management-ui)

The APIM Console image provides a set of environment variables which you can use to tune your container.

APIM Console needs APIM API to run, so you need to update `MGMT_API_URL` to specify where `management-api` is running.

==== Run The Image
[source,shell]
....
$ docker run \
        --publish 80:8080 \
        --env MGMT_API_URL=http://localhost:81/management/organizations/DEFAULT/environments/DEFAULT \
        --name management-ui \
        --detach  \
        graviteeio/apim-management-ui:latest
....

=== APIM Portal (graviteeio/apim-portal-ui)

The APIM Portal image provides a set of environment variables which you can use to tune your container.

APIM Portal needs APIM API to run, so you need to update `PORTAL_API_URL` to specify where `management-api` is running.

==== Run The Image
[source,shell]
....
$ docker run \
        --publish 80:8080 \
        --env PORTAL_API_URL=http://localhost:81/portal/environments/DEFAULT \
        --name portal-ui \
        --detach  \
        graviteeio/apim-portal-ui:latest
....
<commit_msg>Fix broken link (lowercase x instead of X)<commit_after>= APIM Docker Images
:page-sidebar: apim_3_x_sidebar
:page-permalink: apim/3.x/apim_installguide_docker_images.html
:page-folder: apim/installation-guide/docker
:page-layout: apim3x
:docker-image-src: https://raw.githubusercontent.com/gravitee-io/gravitee-docker/master/images
:github-repo: https://github.com/gravitee-io/gravitee-docker
:docker-hub: https://hub.docker.com/r/graviteeio

== Overview

This section explains how to run APIM images in Docker. These procedures are intended for users who are already familiar with Docker.

== Prequisites

To run the official images, you must first install https://docs.docker.com/installation/[Docker, window=\"_blank\"].

== Images

You can find the complete set of APIM images https://hub.docker.com/u/graviteeio/[on Docker Hub, window=\"_blank\"].

|===
|Image name |Version |Base

|{docker-hub}/apim-gateway/[graviteeio/apim-gateway]
|latest
|https://hub.docker.com/_/eclipse-temurin?tab=tags&name=11-jre-focal[eclipse-temurin:11-jre-focal]

|{docker-hub}/apim-management-api/[graviteeio/apim-management-api]
|latest
|https://hub.docker.com/_/eclipse-temurin?tab=tags&name=11-jre-focal[eclipse-temurin:11-jre-focal]

|{docker-hub}/apim-management-ui/[graviteeio/apim-management-ui]
|latest
|https://hub.docker.com/_/nginx?tab=tags&name=1.21-alpine[nginx:1.21-alpine]

|{docker-hub}/apim-portal-ui/[graviteeio/apim-portal-ui]
|latest
|https://hub.docker.com/_/nginx?tab=tags&name=1.21-alpine[nginx:1.21-alpine]

|===


=== APIM Gateway (graviteeio/apim-gateway)

The APIM Gateway image provides a set of environment variables which you can use to tune your container.

MongoDB is the default repository. You can replace the default MongoDB address (`localhost:27017`) with your own (`GRAVITEEIO_MONGODB_HOST:GRAVITEEIO_MONGODB_PORT`).

The APIM Gateway image also uses the Elasticsearch reporter. You can replace the default Elasticsearch address (`localhost:9300`) with another address (`GRAVITEEIO_ELASTIC_HOST:GRAVITEEIO_ELASTIC_PORT`).

==== Run The Image
[source,shell]
....
$ docker run  \
        --publish 82:8082  \
        --name gateway  \
        --detach  \
        graviteeio/apim-gateway:latest
....

==== Configure The Container
If you want to override the default configuration for MongoDB, Elasticsearch and any other properties included in the `gravitee.yml` file,
you need to use environment variables. For more information, see the APIM Gateway link:{{ '/apim/3.x/apim_installguide_gateway_configuration.html#environment_variables' | relative_url }}[configuration] section.

The following example changes the MongoDB connection:
[source,shell]
....
$ docker run  \
        --publish 82:8082  \
        --name gateway  \
        --env GRAVITEE_MANAGEMENT_MONGODB_URI=mongodb://username:password@mongohost:27017/dbname
        --detach  \
        graviteeio/apim-gateway:latest
....

=== APIM API (graviteeio/apim-management-api)

The APIM API image provides a set of environment variables which you can use to tune your container.

MongoDB is our default repository. You can replace the default MongoDB address (`localhost:27017`) by the one you provide (`GRAVITEEIO_MONGODB_HOST:GRAVITEEIO_MONGODB_PORT`).

The Management API image also uses the Elasticsearch reporter. You can replace default Elasticsearch address (`localhost:9300`) by another address (`GRAVITEEIO_ELASTIC_HOST:GRAVITEEIO_ELASTIC_PORT`).

==== Run The Image
[source,shell]
....
$ docker run \
          --publish 81:8083 \
          --name management-api \
          --detach  \
          graviteeio/apim-management-api:latest
....

==== Configure The Container

If you want to override the default configuration for MongoDB, Elasticsearch and any other properties included in the `gravitee.yml` file,
you have to use environment variables. For more information, see the APIM API link:{{ '/apim/3.x/apim_installguide_rest_apis_configuration.html#environment_variables' | relative_url }}[configuration] section.

The following example changes the MongoDB connection:
[source,shell]
....
$ docker run \
          --publish 81:8083 \
          --name management-api \
          --env GRAVITEE_MANAGEMENT_MONGODB_URI=mongodb://username:password@mongohost:27017/dbname
          --detach  \
          graviteeio/apim-management-api:latest
....

=== APIM Console (graviteeio/apim-management-ui)

The APIM Console image provides a set of environment variables which you can use to tune your container.

APIM Console needs APIM API to run, so you need to update `MGMT_API_URL` to specify where `management-api` is running.

==== Run The Image
[source,shell]
....
$ docker run \
        --publish 80:8080 \
        --env MGMT_API_URL=http://localhost:81/management/organizations/DEFAULT/environments/DEFAULT \
        --name management-ui \
        --detach  \
        graviteeio/apim-management-ui:latest
....

=== APIM Portal (graviteeio/apim-portal-ui)

The APIM Portal image provides a set of environment variables which you can use to tune your container.

APIM Portal needs APIM API to run, so you need to update `PORTAL_API_URL` to specify where `management-api` is running.

==== Run The Image
[source,shell]
....
$ docker run \
        --publish 80:8080 \
        --env PORTAL_API_URL=http://localhost:81/portal/environments/DEFAULT \
        --name portal-ui \
        --detach  \
        graviteeio/apim-portal-ui:latest
....

{'fraction_non_alphanumeric': 0.11572234032720215, 'fraction_numerical': 0.017191977077363897, 'mean_word_length': 3.749780509218613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4635793', 'n_tokens_mistral': 3677, 'n_tokens_neox': 3451, 'n_words': 911}