Skip to content

Docker install

The instructions on this page assume that the user is familiar with Docker. You can read the Docker manuals here.

Tags

latest, 2.9.1, 2.9 is RPGM 2.9.1 with R and Python.

How to launch RPGM Server

Directly in command line

Here is an example command line to launch RPGM Server with docker:

docker run -p 8080:8080 --restart unless-stopped --name rpgminstance -e "ROOT=http://localhost:8080" pgmsolutions/rpgmserver

You can then:

  • Stop the instance with docker container stop rpgminstance ;
  • Start the instance with docker container start rpgminstance ;
  • Delete an instance with docker rm rpgminstance.

With docker-compose

Here is an example docker-compose.yml file for RPGM Server :

version: "3"
services:

  rpgm:
    image: pgmsolutions/rpgmserver
    environment:
      ROOT: http://localhost
    restart: unless-stopped
    ports:
      - "8080:8080"

You can then:

  • Create and start RPGM with docker-compose -d up ;
  • Stop it with docker-compose stop ;
  • Start it again with docker-compose start ;
  • Stop and delete the instance with docker-compose down.

Advanced settings

Port

You can change the port on the host system by changing the 8080:8080 with a custom port on the left side. For example, 80:8080 will expose RPGM Server on the port 80. Do not forget to change the ROOT setting!

We still recommend to have a reverse-proxy like nginx in front of RPGM Server, mainly to handle SSL/HTTPS connections.

ROOT setting

The ROOT setting is the URL used by RPGM Server. You can change it in the command line or in the docker-compose.yml file to suit your configuration.

Other settings

You can change any configuration of the config.yml file by using an environment variable. Here is a list of all the config.yml setting with their environment variable names counterpart:

Configuration file setting Environment variable name Default
port PORT 8080
root ROOT http://localhost
https HTTPS false
httpsPort HTTPS_PORT 8081
httpsKey HTTPS_KEY ``
httpsCert HTTPS_CERT ``
authAzureAD AZURE false
authAzureADClientID AZURE_CLIENT_ID ``
authAzureADClientSecret AZURE_CLIENT_SECRET ``
authAzureADResource AZURE_RESOURCE ``
authAzureADTenant AZURE_TENANT ``
authAzureADCommonEndpoint AZURE_COMMON_ENDPOINT false

Volumes

All RPGM-related data is stored in the container's folder /opt/rpgm/data. You can mount this folder on your host system with the parameter -v /path/to/host/folder:/opt/rpgm/data for docker or in docker-compose.yml with the corresponding parameter.

Likewise, all R package are installed by default in /opt/r-library in the container. You can mount this folder to pre-install or keep a persistent R packages folder before starting RPGM Server.