How to install a custom Certificate Authority (CA) to the R runtime of Exploratory Server.

You can install a custom Certificate Authority (CA) to the R runtime of the Exploratory Server by creating a customized Docker image based on the default R environment Docker image.

1. Run a Docker container based on the default r-exploratory Docker image.

Run the following command to start a Docker container based on the default r-exploratory Docker image. In this example, we use the Docker image from Exploratory Server version 6.12.3.6. Please replace the version number in the command with the one you are using.

docker run -it r-exploratory:6.12.3.6 /bin/bash

2. Install a custom CA to the Docker container.

With the shell you opened, install a custom CA that you want to use.

First, you can copy the CA certificate file to /usr/share/ca-certificates directory. You can use any file name as long as you use the .crt suffix.

Once you copy your file, run the following command to enable the CA certificate.

dpkg-reconfigure ca-certificates

Do not close the shell and proceed to the next step.

3. Create a customized Docker image based on the container.

Open another shell on the host Linux machine, and run the following command to find the ID of the Docker container we just ran and made the modifications on.

docker ps

The above command should give the table that looks like the following as the output.

CONTAINER ID        IMAGE                    COMMAND         PORTS       
aad6f8d956a9        r-exploratory:6.12.3.6   "/bin/bash"    6311/tcp     

If you see multiple lines in the output, look for a line with r-exploratory and /bin/bash.

Find the Container ID for the Docker container from the table. In this case, it's aad6f8d956a9.

With the ID, you can now create a Docker image with the modifications. Here, let's give the new image the customized version number 6.12.3.6.1.

docker commit  -c 'CMD ["R", "-e", "Rserve::run.Rserve(remote=TRUE)"]' -c 'EXPOSE 6311' aad6f8d956a9 r-exploratory:6.12.3.6.1

4. Verify that the new Docker image has your changes.

Start a Docker container with the new Docker image you just created.

docker run -it r-exploratory:6.12.3.6.1 /bin/bash

It opens a new shell. Make sure your CA certificate file exists.

ls /usr/share/ca-certificates

5. Use the customized r-exploratory Docker image on the Exploratory Server.

Locate the line in the docker-compose.yml file that specified the Docker image version for the r-exploratory Docker container that looks like the following.

...
  rserve:
    image: r-exploratory:6.12.3.6
...

Modify the version to the one you just created.

...
  rserve:
    image: r-exploratory:6.12.3.6.1
...

Now, you can restart the Exploratory Server to make the change effective in the R environment of the Exploratory Server.

Export Chart Image
Output Format
PNG SVG
Background
Set background transparent
Size
Width (Pixel)
Height (Pixel)
Pixel Ratio